SUNRPC: Clean up rpc_pipefs lookup code...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
7364af6a2d
commit
b5bb61da2e
@ -484,12 +484,12 @@ static const struct dentry_operations rpc_dentry_operations = {
|
|||||||
.d_delete = rpc_delete_dentry,
|
.d_delete = rpc_delete_dentry,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int __rpc_lookup_path(const char *pathname, unsigned flags,
|
||||||
rpc_lookup_parent(char *path, struct nameidata *nd)
|
struct nameidata *nd)
|
||||||
{
|
{
|
||||||
struct vfsmount *mnt;
|
struct vfsmount *mnt;
|
||||||
|
|
||||||
if (path[0] == '\0')
|
if (pathname[0] == '\0')
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
mnt = rpc_get_mount();
|
mnt = rpc_get_mount();
|
||||||
@ -499,15 +499,20 @@ rpc_lookup_parent(char *path, struct nameidata *nd)
|
|||||||
return PTR_ERR(mnt);
|
return PTR_ERR(mnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vfs_path_lookup(mnt->mnt_root, mnt, path, LOOKUP_PARENT, nd)) {
|
if (vfs_path_lookup(mnt->mnt_root, mnt, pathname, flags, nd)) {
|
||||||
printk(KERN_WARNING "%s: %s failed to find path %s\n",
|
printk(KERN_WARNING "%s: %s failed to find path %s\n",
|
||||||
__FILE__, __func__, path);
|
__FILE__, __func__, pathname);
|
||||||
rpc_put_mount();
|
rpc_put_mount();
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int rpc_lookup_parent(const char *pathname, struct nameidata *nd)
|
||||||
|
{
|
||||||
|
return __rpc_lookup_path(pathname, LOOKUP_PARENT, nd);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rpc_release_path(struct nameidata *nd)
|
rpc_release_path(struct nameidata *nd)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user