aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-27 12:59:52 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:11 -0400
commit64e09fa2e1fef1696a8685c7aad7e0d3dd24ce71 (patch)
tree9f5596dd005fe225a5b077c9ff0c9d5051218b90
parent1ea65c96077f9bb5c0e5e224a4da751d269c5f94 (diff)
switch xfs_find_handle() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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;