mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -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
10
fs/stat.c
10
fs/stat.c
|
|
@ -57,13 +57,13 @@ EXPORT_SYMBOL(vfs_getattr);
|
|||
|
||||
int vfs_fstat(unsigned int fd, struct kstat *stat)
|
||||
{
|
||||
int fput_needed;
|
||||
struct file *f = fget_raw_light(fd, &fput_needed);
|
||||
struct fd f = fdget_raw(fd);
|
||||
int error = -EBADF;
|
||||
|
||||
if (f) {
|
||||
error = vfs_getattr(f->f_path.mnt, f->f_path.dentry, stat);
|
||||
fput_light(f, fput_needed);
|
||||
if (f.file) {
|
||||
error = vfs_getattr(f.file->f_path.mnt, f.file->f_path.dentry,
|
||||
stat);
|
||||
fdput(f);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue