Skip to content

Commit

Permalink
switch xfs_find_handle() to fget_light()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 1ea65c9 commit 64e09fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/xfs/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 64e09fa

Please sign in to comment.