]> Pileus Git - ~andy/linux/blobdiff - fs/statfs.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[~andy/linux] / fs / statfs.c
index 95ad5c0e586c9f64fe492e141387b5092956d553..f8e832e6f0a2220d0e16163b230ad0f710ee4132 100644 (file)
@@ -87,12 +87,11 @@ int user_statfs(const char __user *pathname, struct kstatfs *st)
 
 int fd_statfs(int fd, struct kstatfs *st)
 {
-       int fput_needed;
-       struct file *file = fget_light(fd, &fput_needed);
+       struct fd f = fdget(fd);
        int error = -EBADF;
-       if (file) {
-               error = vfs_statfs(&file->f_path, st);
-               fput_light(file, fput_needed);
+       if (f.file) {
+               error = vfs_statfs(&f.file->f_path, st);
+               fdput(f);
        }
        return error;
 }