diff options
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 21483eac402d..8305f2ac6773 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -70,16 +70,16 @@ xfs_find_handle( | |||
70 | int hsize; | 70 | int hsize; |
71 | xfs_handle_t handle; | 71 | xfs_handle_t handle; |
72 | struct inode *inode; | 72 | struct inode *inode; |
73 | struct file *file = NULL; | 73 | struct fd f; |
74 | struct path path; | 74 | struct path path; |
75 | int error, fput_needed; | 75 | int error; |
76 | struct xfs_inode *ip; | 76 | struct xfs_inode *ip; |
77 | 77 | ||
78 | if (cmd == XFS_IOC_FD_TO_HANDLE) { | 78 | if (cmd == XFS_IOC_FD_TO_HANDLE) { |
79 | file = fget_light(hreq->fd, &fput_needed); | 79 | f = fdget(hreq->fd); |
80 | if (!file) | 80 | if (!f.file) |
81 | return -EBADF; | 81 | return -EBADF; |
82 | inode = file->f_path.dentry->d_inode; | 82 | inode = f.file->f_path.dentry->d_inode; |
83 | } else { | 83 | } else { |
84 | error = user_lpath((const char __user *)hreq->path, &path); | 84 | error = user_lpath((const char __user *)hreq->path, &path); |
85 | if (error) | 85 | if (error) |
@@ -134,7 +134,7 @@ xfs_find_handle( | |||
134 | 134 | ||
135 | out_put: | 135 | out_put: |
136 | if (cmd == XFS_IOC_FD_TO_HANDLE) | 136 | if (cmd == XFS_IOC_FD_TO_HANDLE) |
137 | fput_light(file, fput_needed); | 137 | fdput(f); |
138 | else | 138 | else |
139 | path_put(&path); | 139 | path_put(&path); |
140 | return error; | 140 | return error; |