diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-28 14:55:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-28 14:55:17 -0700 |
commit | e994defb7b6813ba6fa7a2a36e86d2455ad1dc35 (patch) | |
tree | 85d218834dcc60b934f8709e2d1f4df46002e2e3 /fs/stat.c | |
parent | 3f9f0aa687d45cbc8e7bb3cfd3aab555dcc8872e (diff) | |
download | op-kernel-dev-e994defb7b6813ba6fa7a2a36e86d2455ad1dc35.zip op-kernel-dev-e994defb7b6813ba6fa7a2a36e86d2455ad1dc35.tar.gz |
VFS: make vfs_fstat() use f[get|put]_light()
Use the *_light() versions that properly avoid doing the file user count
updates when they are unnecessary.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/stat.c')
-rw-r--r-- | fs/stat.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |