]> Pileus Git - ~andy/linux/blobdiff - fs/stat.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
[~andy/linux] / fs / stat.c
index 208039eec6c79b3123de706942d596afc5a6a239..eae494630a36507e03defe8bdf836ee6b337b4ee 100644 (file)
--- a/fs/stat.c
+++ b/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;
 }