mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
switch simple cases of fget_light to fdget
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
a5b470ba06
commit
2903ff019b
44 changed files with 633 additions and 763 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue