Commit 47b3c811 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nathan Scott

[XFS] cleanup user path walking code

SGI Modid: 2.5.x-xfs:slinx:134179a
parent 2941a57b
...@@ -75,17 +75,9 @@ xfs_find_handle( ...@@ -75,17 +75,9 @@ xfs_find_handle(
case XFS_IOC_PATH_TO_FSHANDLE: case XFS_IOC_PATH_TO_FSHANDLE:
case XFS_IOC_PATH_TO_HANDLE: { case XFS_IOC_PATH_TO_HANDLE: {
struct nameidata nd; struct nameidata nd;
char *path;
int error; int error;
/* we need the path */ error = user_path_walk_link(hreq.path, &nd);
path = getname(hreq.path);
if (IS_ERR(path))
return PTR_ERR(path);
/* traverse the path */
error = path_lookup(path, 0, &nd);
putname(path);
if (error) if (error)
return error; return error;
...@@ -107,7 +99,6 @@ xfs_find_handle( ...@@ -107,7 +99,6 @@ xfs_find_handle(
ASSERT(file->f_dentry->d_inode); ASSERT(file->f_dentry->d_inode);
inode = igrab(file->f_dentry->d_inode); inode = igrab(file->f_dentry->d_inode);
fput(file); fput(file);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment