projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f9f0aa
)
VFS: make vfs_fstat() use f[get|put]_light()
author
Linus Torvalds
<torvalds@linux-foundation.org>
Sat, 28 Apr 2012 21:55:17 +0000
(14:55 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Sat, 28 Apr 2012 21:55:17 +0000
(14:55 -0700)
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>
fs/stat.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/stat.c
b/fs/stat.c
index c733dc5753aea129a1e5deb76bf48d0cb640d6e3..88b36c7707627b06f1ef74b275254ca64b1bbffe 100644
(file)
--- 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;
}