diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-09 15:14:17 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-09 15:14:17 -0400 |
commit | b5bb61da2efe7519eedd6a8f3830ab33ab774b83 (patch) | |
tree | 811176448a5413ddbb01dca36c69bb390c8479cd /net/sunrpc | |
parent | 7364af6a2d5e708b5c6fee3cce08d1bd7b27c9f1 (diff) |
SUNRPC: Clean up rpc_pipefs lookup code...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 8fa718201e3..2940b926648 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -484,12 +484,12 @@ static const struct dentry_operations rpc_dentry_operations = { .d_delete = rpc_delete_dentry, }; -static int -rpc_lookup_parent(char *path, struct nameidata *nd) +static int __rpc_lookup_path(const char *pathname, unsigned flags, + struct nameidata *nd) { struct vfsmount *mnt; - if (path[0] == '\0') + if (pathname[0] == '\0') return -ENOENT; mnt = rpc_get_mount(); @@ -499,15 +499,20 @@ rpc_lookup_parent(char *path, struct nameidata *nd) 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", - __FILE__, __func__, path); + __FILE__, __func__, pathname); rpc_put_mount(); return -ENOENT; } return 0; } +static int rpc_lookup_parent(const char *pathname, struct nameidata *nd) +{ + return __rpc_lookup_path(pathname, LOOKUP_PARENT, nd); +} + static void rpc_release_path(struct nameidata *nd) { |