summaryrefslogtreecommitdiffstats
path: root/fs/statfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-28 18:52:22 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-27 04:20:08 +0200
commit2903ff019b346ab8d36ebbf54853c3aaf6590608 (patch)
tree962d94054765bb37bc00e977c3036e65c5fd91fe /fs/statfs.c
parentnew helpers: fdget()/fdput() (diff)
downloadlinux-2903ff019b346ab8d36ebbf54853c3aaf6590608.tar.xz
linux-2903ff019b346ab8d36ebbf54853c3aaf6590608.zip
switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/statfs.c')
-rw-r--r--fs/statfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/statfs.c b/fs/statfs.c
index 95ad5c0e586c..f8e832e6f0a2 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -87,12 +87,11 @@ int user_statfs(const char __user *pathname, struct kstatfs *st)
int fd_statfs(int fd, struct kstatfs *st)
{
- int fput_needed;
- struct file *file = fget_light(fd, &fput_needed);
+ struct fd f = fdget(fd);
int error = -EBADF;
- if (file) {
- error = vfs_statfs(&file->f_path, st);
- fput_light(file, fput_needed);
+ if (f.file) {
+ error = vfs_statfs(&f.file->f_path, st);
+ fdput(f);
}
return error;
}