aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-07-07 12:53:11 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:42 -0400
commitebabe9a9001af0af56c0c2780ca1576246e7a74b (patch)
treeb263299f575c650b6e9d95c7c4bdeef958af2fc9 /fs/compat.c
parent336fb3b97b78edc65bae0b223b83bf676cfe29e2 (diff)
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 <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 6490d2134ff3..fc6c2adf2f6b 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -266,7 +266,7 @@ asmlinkage long compat_sys_statfs(const char __user *pathname, struct compat_sta
266 error = user_path(pathname, &path); 266 error = user_path(pathname, &path);
267 if (!error) { 267 if (!error) {
268 struct kstatfs tmp; 268 struct kstatfs tmp;
269 error = vfs_statfs(path.dentry, &tmp); 269 error = vfs_statfs(&path, &tmp);
270 if (!error) 270 if (!error)
271 error = put_compat_statfs(buf, &tmp); 271 error = put_compat_statfs(buf, &tmp);
272 path_put(&path); 272 path_put(&path);
@@ -284,7 +284,7 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user
284 file = fget(fd); 284 file = fget(fd);
285 if (!file) 285 if (!file)
286 goto out; 286 goto out;
287 error = vfs_statfs(file->f_path.dentry, &tmp); 287 error = vfs_statfs(&file->f_path, &tmp);
288 if (!error) 288 if (!error)
289 error = put_compat_statfs(buf, &tmp); 289 error = put_compat_statfs(buf, &tmp);
290 fput(file); 290 fput(file);
@@ -334,7 +334,7 @@ asmlinkage long compat_sys_statfs64(const char __user *pathname, compat_size_t s
334 error = user_path(pathname, &path); 334 error = user_path(pathname, &path);
335 if (!error) { 335 if (!error) {
336 struct kstatfs tmp; 336 struct kstatfs tmp;
337 error = vfs_statfs(path.dentry, &tmp); 337 error = vfs_statfs(&path, &tmp);
338 if (!error) 338 if (!error)
339 error = put_compat_statfs64(buf, &tmp); 339 error = put_compat_statfs64(buf, &tmp);
340 path_put(&path); 340 path_put(&path);
@@ -355,7 +355,7 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c
355 file = fget(fd); 355 file = fget(fd);
356 if (!file) 356 if (!file)
357 goto out; 357 goto out;
358 error = vfs_statfs(file->f_path.dentry, &tmp); 358 error = vfs_statfs(&file->f_path, &tmp);
359 if (!error) 359 if (!error)
360 error = put_compat_statfs64(buf, &tmp); 360 error = put_compat_statfs64(buf, &tmp);
361 fput(file); 361 fput(file);
@@ -378,7 +378,7 @@ asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u)
378 sb = user_get_super(new_decode_dev(dev)); 378 sb = user_get_super(new_decode_dev(dev));
379 if (!sb) 379 if (!sb)
380 return -EINVAL; 380 return -EINVAL;
381 err = vfs_statfs(sb->s_root, &sbuf); 381 err = statfs_by_dentry(sb->s_root, &sbuf);
382 drop_super(sb); 382 drop_super(sb);
383 if (err) 383 if (err)
384 return err; 384 return err;