diff options
Diffstat (limited to 'fs/stat.c')
-rw-r--r-- | fs/stat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/stat.c b/fs/stat.c index b30ac60291e..0cef3366a91 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -57,12 +57,13 @@ EXPORT_SYMBOL(vfs_getattr); int vfs_fstat(unsigned int fd, struct kstat *stat) { - struct file *f = fget(fd); + int fput_needed; + struct file *f = fget_light(fd, &fput_needed); int error = -EBADF; if (f) { error = vfs_getattr(f->f_path.mnt, f->f_path.dentry, stat); - fput(f); + fput_light(f, fput_needed); } return error; } |