switch simple cases of fget_light to fdget
[linux-2.6-block.git] / fs / xfs / xfs_ioctl.c
index 21483eac402d502d720a40808b22c1265be023e6..8305f2ac6773a8ee5efd1b0e24546e4194807187 100644 (file)
@@ -70,16 +70,16 @@ xfs_find_handle(
        int                     hsize;
        xfs_handle_t            handle;
        struct inode            *inode;
-       struct file             *file = NULL;
+       struct fd               f;
        struct path             path;
-       int                     error, fput_needed;
+       int                     error;
        struct xfs_inode        *ip;
 
        if (cmd == XFS_IOC_FD_TO_HANDLE) {
-               file = fget_light(hreq->fd, &fput_needed);
-               if (!file)
+               f = fdget(hreq->fd);
+               if (!f.file)
                        return -EBADF;
-               inode = file->f_path.dentry->d_inode;
+               inode = f.file->f_path.dentry->d_inode;
        } else {
                error = user_lpath((const char __user *)hreq->path, &path);
                if (error)
@@ -134,7 +134,7 @@ xfs_find_handle(
 
  out_put:
        if (cmd == XFS_IOC_FD_TO_HANDLE)
-               fput_light(file, fput_needed);
+               fdput(f);
        else
                path_put(&path);
        return error;