switch simple cases of fget_light to fdget

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-08-28 12:52:22 -04:00
parent a5b470ba06
commit 2903ff019b
44 changed files with 631 additions and 761 deletions

View File

@@ -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;
}