aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 0e0232c3b6d9..21483eac402d 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -72,11 +72,11 @@ xfs_find_handle(
72 struct inode *inode; 72 struct inode *inode;
73 struct file *file = NULL; 73 struct file *file = NULL;
74 struct path path; 74 struct path path;
75 int error; 75 int error, fput_needed;
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(hreq->fd); 79 file = fget_light(hreq->fd, &fput_needed);
80 if (!file) 80 if (!file)
81 return -EBADF; 81 return -EBADF;
82 inode = file->f_path.dentry->d_inode; 82 inode = file->f_path.dentry->d_inode;
@@ -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(file); 137 fput_light(file, fput_needed);
138 else 138 else
139 path_put(&path); 139 path_put(&path);
140 return error; 140 return error;