mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
pass a struct path to vfs_statfs
We'll need the path to implement the flags field for statvfs support. We do have it available in all callers except: - ecryptfs_statfs. This one doesn't actually need vfs_statfs but just needs to do a caller to the lower filesystem statfs method. - sys_ustat. Add a non-exported statfs_by_dentry helper for it which doesn't won't be able to fill out the flags field later on. In addition rename the helpers for statfs vs fstatfs to do_*statfs instead of the misleading vfs prefix. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
336fb3b97b
commit
ebabe9a900
11 changed files with 67 additions and 46 deletions
10
fs/compat.c
10
fs/compat.c
|
|
@ -266,7 +266,7 @@ asmlinkage long compat_sys_statfs(const char __user *pathname, struct compat_sta
|
|||
error = user_path(pathname, &path);
|
||||
if (!error) {
|
||||
struct kstatfs tmp;
|
||||
error = vfs_statfs(path.dentry, &tmp);
|
||||
error = vfs_statfs(&path, &tmp);
|
||||
if (!error)
|
||||
error = put_compat_statfs(buf, &tmp);
|
||||
path_put(&path);
|
||||
|
|
@ -284,7 +284,7 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user
|
|||
file = fget(fd);
|
||||
if (!file)
|
||||
goto out;
|
||||
error = vfs_statfs(file->f_path.dentry, &tmp);
|
||||
error = vfs_statfs(&file->f_path, &tmp);
|
||||
if (!error)
|
||||
error = put_compat_statfs(buf, &tmp);
|
||||
fput(file);
|
||||
|
|
@ -334,7 +334,7 @@ asmlinkage long compat_sys_statfs64(const char __user *pathname, compat_size_t s
|
|||
error = user_path(pathname, &path);
|
||||
if (!error) {
|
||||
struct kstatfs tmp;
|
||||
error = vfs_statfs(path.dentry, &tmp);
|
||||
error = vfs_statfs(&path, &tmp);
|
||||
if (!error)
|
||||
error = put_compat_statfs64(buf, &tmp);
|
||||
path_put(&path);
|
||||
|
|
@ -355,7 +355,7 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c
|
|||
file = fget(fd);
|
||||
if (!file)
|
||||
goto out;
|
||||
error = vfs_statfs(file->f_path.dentry, &tmp);
|
||||
error = vfs_statfs(&file->f_path, &tmp);
|
||||
if (!error)
|
||||
error = put_compat_statfs64(buf, &tmp);
|
||||
fput(file);
|
||||
|
|
@ -378,7 +378,7 @@ asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u)
|
|||
sb = user_get_super(new_decode_dev(dev));
|
||||
if (!sb)
|
||||
return -EINVAL;
|
||||
err = vfs_statfs(sb->s_root, &sbuf);
|
||||
err = statfs_by_dentry(sb->s_root, &sbuf);
|
||||
drop_super(sb);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue