]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
switch fstat to fget_light/fput_light
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 21 Apr 2012 22:46:15 +0000 (18:46 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 21 Apr 2012 22:49:58 +0000 (18:49 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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;
 }