switch xfs_find_handle() to fget_light()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 27 Aug 2012 16:59:52 +0000 (12:59 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 27 Sep 2012 01:10:11 +0000 (21:10 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/xfs/xfs_ioctl.c

index 0e0232c3b6d98039eb2b73fb556faec1b9069016..21483eac402d502d720a40808b22c1265be023e6 100644 (file)
@@ -72,11 +72,11 @@ xfs_find_handle(
        struct inode            *inode;
        struct file             *file = NULL;
        struct path             path;
-       int                     error;
+       int                     error, fput_needed;
        struct xfs_inode        *ip;
 
        if (cmd == XFS_IOC_FD_TO_HANDLE) {
-               file = fget(hreq->fd);
+               file = fget_light(hreq->fd, &fput_needed);
                if (!file)
                        return -EBADF;
                inode = file->f_path.dentry->d_inode;
@@ -134,7 +134,7 @@ xfs_find_handle(
 
  out_put:
        if (cmd == XFS_IOC_FD_TO_HANDLE)
-               fput(file);
+               fput_light(file, fput_needed);
        else
                path_put(&path);
        return error;