diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-21 18:47:27 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 23:28:31 -0400 |
commit | 0aa2ee5f0a341a7fc081a499b221d29784ed711d (patch) | |
tree | 0b147d65e3bcaa7f82638d0b9d711fd86f3ae2af /fs/statfs.c | |
parent | bdc689594bf3ce967bc3a17ba5db3f23222dede0 (diff) |
switch statfs to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/statfs.c')
-rw-r--r-- | fs/statfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/statfs.c b/fs/statfs.c index 43e6b6fe4e85..95ad5c0e586c 100644 --- a/fs/statfs.c +++ b/fs/statfs.c | |||
@@ -87,11 +87,12 @@ int user_statfs(const char __user *pathname, struct kstatfs *st) | |||
87 | 87 | ||
88 | int fd_statfs(int fd, struct kstatfs *st) | 88 | int fd_statfs(int fd, struct kstatfs *st) |
89 | { | 89 | { |
90 | struct file *file = fget(fd); | 90 | int fput_needed; |
91 | struct file *file = fget_light(fd, &fput_needed); | ||
91 | int error = -EBADF; | 92 | int error = -EBADF; |
92 | if (file) { | 93 | if (file) { |
93 | error = vfs_statfs(&file->f_path, st); | 94 | error = vfs_statfs(&file->f_path, st); |
94 | fput(file); | 95 | fput_light(file, fput_needed); |
95 | } | 96 | } |
96 | return error; | 97 | return error; |
97 | } | 98 | } |