switch xfs_find_handle() to fget_light()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2012-08-27 12:59:52 -04:00
parent 1ea65c9607
commit 64e09fa2e1
1 changed files with 3 additions and 3 deletions

View File

@ -72,11 +72,11 @@ xfs_find_handle(
struct inode *inode; struct inode *inode;
struct file *file = NULL; struct file *file = NULL;
struct path path; struct path path;
int error; int error, fput_needed;
struct xfs_inode *ip; struct xfs_inode *ip;
if (cmd == XFS_IOC_FD_TO_HANDLE) { if (cmd == XFS_IOC_FD_TO_HANDLE) {
file = fget(hreq->fd); file = fget_light(hreq->fd, &fput_needed);
if (!file) if (!file)
return -EBADF; return -EBADF;
inode = file->f_path.dentry->d_inode; inode = file->f_path.dentry->d_inode;
@ -134,7 +134,7 @@ xfs_find_handle(
out_put: out_put:
if (cmd == XFS_IOC_FD_TO_HANDLE) if (cmd == XFS_IOC_FD_TO_HANDLE)
fput(file); fput_light(file, fput_needed);
else else
path_put(&path); path_put(&path);
return error; return error;