patch-2.4.7 linux/arch/s390x/kernel/linux32.c
Next file: linux/arch/s390x/kernel/ptrace.c
Previous file: linux/arch/s390x/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 78
- Date:
Wed Jul 4 11:50:39 2001
- Orig file:
v2.4.6/linux/arch/s390x/kernel/linux32.c
- Orig date:
Thu Apr 26 14:10:16 2001
diff -u --recursive --new-file v2.4.6/linux/arch/s390x/kernel/linux32.c linux/arch/s390x/kernel/linux32.c
@@ -897,24 +897,24 @@
return sys32_fcntl(fd, cmd, arg);
}
-struct dqblk32 {
- __u32 dqb_bhardlimit;
- __u32 dqb_bsoftlimit;
- __u32 dqb_curblocks;
+struct mem_dqblk32 {
__u32 dqb_ihardlimit;
__u32 dqb_isoftlimit;
__u32 dqb_curinodes;
+ __u32 dqb_bhardlimit;
+ __u32 dqb_bsoftlimit;
+ __u64 dqb_curspace;
__kernel_time_t32 dqb_btime;
__kernel_time_t32 dqb_itime;
};
-extern asmlinkage int sys_quotactl(int cmd, const char *special, int id, caddr_t addr);
+extern asmlinkage long sys_quotactl(int cmd, const char *special, int id, __kernel_caddr_t addr);
asmlinkage int sys32_quotactl(int cmd, const char *special, int id, unsigned long addr)
{
int cmds = cmd >> SUBCMDSHIFT;
int err;
- struct dqblk d;
+ struct mem_dqblk d;
mm_segment_t old_fs;
char *spec;
@@ -924,33 +924,35 @@
case Q_SETQUOTA:
case Q_SETUSE:
case Q_SETQLIM:
- if (copy_from_user (&d, (struct dqblk32 *)addr,
- sizeof (struct dqblk32)))
+ if (copy_from_user (&d, (struct mem_dqblk32 *)addr,
+ sizeof (struct mem_dqblk32)))
return -EFAULT;
- d.dqb_itime = ((struct dqblk32 *)&d)->dqb_itime;
- d.dqb_btime = ((struct dqblk32 *)&d)->dqb_btime;
+ d.dqb_itime = ((struct mem_dqblk32 *)&d)->dqb_itime;
+ d.dqb_btime = ((struct mem_dqblk32 *)&d)->dqb_btime;
break;
default:
return sys_quotactl(cmd, special,
- id, (caddr_t)addr);
+ id, (__kernel_caddr_t)addr);
}
spec = getname (special);
err = PTR_ERR(spec);
if (IS_ERR(spec)) return err;
old_fs = get_fs ();
set_fs (KERNEL_DS);
- err = sys_quotactl(cmd, (const char *)spec, id, (caddr_t)&d);
+ err = sys_quotactl(cmd, (const char *)spec, id, (__kernel_caddr_t)&d);
set_fs (old_fs);
putname (spec);
+ if (err)
+ return err;
if (cmds == Q_GETQUOTA) {
__kernel_time_t b = d.dqb_btime, i = d.dqb_itime;
- ((struct dqblk32 *)&d)->dqb_itime = i;
- ((struct dqblk32 *)&d)->dqb_btime = b;
- if (copy_to_user ((struct dqblk32 *)addr, &d,
- sizeof (struct dqblk32)))
+ ((struct mem_dqblk32 *)&d)->dqb_itime = i;
+ ((struct mem_dqblk32 *)&d)->dqb_btime = b;
+ if (copy_to_user ((struct mem_dqblk32 *)addr, &d,
+ sizeof (struct mem_dqblk32)))
return -EFAULT;
}
- return err;
+ return 0;
}
static inline int put_statfs (struct statfs32 *ubuf, struct statfs *kbuf)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)