Skip to content

Commit

Permalink
switch statfs to fget_light/fput_light
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 30, 2012
1 parent bdc6895 commit 0aa2ee5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/statfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ int user_statfs(const char __user *pathname, struct kstatfs *st)

int fd_statfs(int fd, struct kstatfs *st)
{
struct file *file = fget(fd);
int fput_needed;
struct file *file = fget_light(fd, &fput_needed);
int error = -EBADF;
if (file) {
error = vfs_statfs(&file->f_path, st);
fput(file);
fput_light(file, fput_needed);
}
return error;
}
Expand Down

0 comments on commit 0aa2ee5

Please sign in to comment.