Loading arch/parisc/hpux/sys_hpux.c +1 −8 Original line number Diff line number Diff line Loading @@ -136,16 +136,9 @@ struct hpux_ustat { */ static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) { struct super_block *s; struct hpux_ustat tmp; /* Changed to hpux_ustat */ struct kstatfs sbuf; int err = -EINVAL; s = user_get_super(dev); if (s == NULL) goto out; err = statfs_by_dentry(s->s_root, &sbuf); drop_super(s); int err = vfs_ustat(dev, &sbuf); if (err) goto out; Loading fs/compat.c +1 −8 Original line number Diff line number Diff line Loading @@ -342,16 +342,9 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c */ asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u) { struct super_block *sb; struct compat_ustat tmp; struct kstatfs sbuf; int err; sb = user_get_super(new_decode_dev(dev)); if (!sb) return -EINVAL; err = statfs_by_dentry(sb->s_root, &sbuf); drop_super(sb); int err = vfs_ustat(new_decode_dev(dev), &sbuf); if (err) return err; Loading fs/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ extern int do_remount_sb(struct super_block *, int, void *, int); extern bool grab_super_passive(struct super_block *sb); extern struct dentry *mount_fs(struct file_system_type *, int, const char *, void *); extern struct super_block *user_get_super(dev_t); /* * open.c Loading fs/statfs.c +13 −8 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include <linux/statfs.h> #include <linux/security.h> #include <linux/uaccess.h> #include "internal.h" static int flags_by_mnt(int mnt_flags) { Loading Loading @@ -45,7 +46,7 @@ static int calculate_f_flags(struct vfsmount *mnt) flags_by_sb(mnt->mnt_sb->s_flags); } int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) { int retval; Loading Loading @@ -205,19 +206,23 @@ SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, size_t, sz, struct statfs64 __user return error; } SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) int vfs_ustat(dev_t dev, struct kstatfs *sbuf) { struct super_block *s; struct ustat tmp; struct kstatfs sbuf; struct super_block *s = user_get_super(dev); int err; s = user_get_super(new_decode_dev(dev)); if (!s) return -EINVAL; err = statfs_by_dentry(s->s_root, &sbuf); err = statfs_by_dentry(s->s_root, sbuf); drop_super(s); return err; } SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) { struct ustat tmp; struct kstatfs sbuf; int err = vfs_ustat(new_decode_dev(dev), &sbuf); if (err) return err; Loading include/linux/fs.h +1 −2 Original line number Diff line number Diff line Loading @@ -1939,7 +1939,7 @@ extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, extern int vfs_statfs(struct path *, struct kstatfs *); extern int user_statfs(const char __user *, struct kstatfs *); extern int fd_statfs(int, struct kstatfs *); extern int statfs_by_dentry(struct dentry *, struct kstatfs *); extern int vfs_ustat(dev_t, struct kstatfs *); extern int freeze_super(struct super_block *super); extern int thaw_super(struct super_block *super); extern bool our_mnt(struct vfsmount *mnt); Loading Loading @@ -2531,7 +2531,6 @@ extern void put_filesystem(struct file_system_type *fs); extern struct file_system_type *get_fs_type(const char *name); extern struct super_block *get_super(struct block_device *); extern struct super_block *get_active_super(struct block_device *bdev); extern struct super_block *user_get_super(dev_t); extern void drop_super(struct super_block *sb); extern void iterate_supers(void (*)(struct super_block *, void *), void *); extern void iterate_supers_type(struct file_system_type *, Loading Loading
arch/parisc/hpux/sys_hpux.c +1 −8 Original line number Diff line number Diff line Loading @@ -136,16 +136,9 @@ struct hpux_ustat { */ static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) { struct super_block *s; struct hpux_ustat tmp; /* Changed to hpux_ustat */ struct kstatfs sbuf; int err = -EINVAL; s = user_get_super(dev); if (s == NULL) goto out; err = statfs_by_dentry(s->s_root, &sbuf); drop_super(s); int err = vfs_ustat(dev, &sbuf); if (err) goto out; Loading
fs/compat.c +1 −8 Original line number Diff line number Diff line Loading @@ -342,16 +342,9 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c */ asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u) { struct super_block *sb; struct compat_ustat tmp; struct kstatfs sbuf; int err; sb = user_get_super(new_decode_dev(dev)); if (!sb) return -EINVAL; err = statfs_by_dentry(sb->s_root, &sbuf); drop_super(sb); int err = vfs_ustat(new_decode_dev(dev), &sbuf); if (err) return err; Loading
fs/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ extern int do_remount_sb(struct super_block *, int, void *, int); extern bool grab_super_passive(struct super_block *sb); extern struct dentry *mount_fs(struct file_system_type *, int, const char *, void *); extern struct super_block *user_get_super(dev_t); /* * open.c Loading
fs/statfs.c +13 −8 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include <linux/statfs.h> #include <linux/security.h> #include <linux/uaccess.h> #include "internal.h" static int flags_by_mnt(int mnt_flags) { Loading Loading @@ -45,7 +46,7 @@ static int calculate_f_flags(struct vfsmount *mnt) flags_by_sb(mnt->mnt_sb->s_flags); } int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) { int retval; Loading Loading @@ -205,19 +206,23 @@ SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, size_t, sz, struct statfs64 __user return error; } SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) int vfs_ustat(dev_t dev, struct kstatfs *sbuf) { struct super_block *s; struct ustat tmp; struct kstatfs sbuf; struct super_block *s = user_get_super(dev); int err; s = user_get_super(new_decode_dev(dev)); if (!s) return -EINVAL; err = statfs_by_dentry(s->s_root, &sbuf); err = statfs_by_dentry(s->s_root, sbuf); drop_super(s); return err; } SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) { struct ustat tmp; struct kstatfs sbuf; int err = vfs_ustat(new_decode_dev(dev), &sbuf); if (err) return err; Loading
include/linux/fs.h +1 −2 Original line number Diff line number Diff line Loading @@ -1939,7 +1939,7 @@ extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, extern int vfs_statfs(struct path *, struct kstatfs *); extern int user_statfs(const char __user *, struct kstatfs *); extern int fd_statfs(int, struct kstatfs *); extern int statfs_by_dentry(struct dentry *, struct kstatfs *); extern int vfs_ustat(dev_t, struct kstatfs *); extern int freeze_super(struct super_block *super); extern int thaw_super(struct super_block *super); extern bool our_mnt(struct vfsmount *mnt); Loading Loading @@ -2531,7 +2531,6 @@ extern void put_filesystem(struct file_system_type *fs); extern struct file_system_type *get_fs_type(const char *name); extern struct super_block *get_super(struct block_device *); extern struct super_block *get_active_super(struct block_device *bdev); extern struct super_block *user_get_super(dev_t); extern void drop_super(struct super_block *sb); extern void iterate_supers(void (*)(struct super_block *, void *), void *); extern void iterate_supers_type(struct file_system_type *, Loading