mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user