switch simple cases of fget_light to fdget

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2012-08-28 12:52:22 -04:00
commit 2903ff019b
44 changed files with 633 additions and 763 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;
}