aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/rpc_pipe.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-09 15:14:17 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-09 15:14:17 -0400
commitb5bb61da2efe7519eedd6a8f3830ab33ab774b83 (patch)
tree811176448a5413ddbb01dca36c69bb390c8479cd /net/sunrpc/rpc_pipe.c
parent7364af6a2d5e708b5c6fee3cce08d1bd7b27c9f1 (diff)
SUNRPC: Clean up rpc_pipefs lookup code...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r--net/sunrpc/rpc_pipe.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 8fa718201e3f..2940b926648c 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 = {
484 .d_delete = rpc_delete_dentry, 484 .d_delete = rpc_delete_dentry,
485}; 485};
486 486
487static int 487static int __rpc_lookup_path(const char *pathname, unsigned flags,
488rpc_lookup_parent(char *path, struct nameidata *nd) 488 struct nameidata *nd)
489{ 489{
490 struct vfsmount *mnt; 490 struct vfsmount *mnt;
491 491
492 if (path[0] == '\0') 492 if (pathname[0] == '\0')
493 return -ENOENT; 493 return -ENOENT;
494 494
495 mnt = rpc_get_mount(); 495 mnt = rpc_get_mount();
@@ -499,15 +499,20 @@ rpc_lookup_parent(char *path, struct nameidata *nd)
499 return PTR_ERR(mnt); 499 return PTR_ERR(mnt);
500 } 500 }
501 501
502 if (vfs_path_lookup(mnt->mnt_root, mnt, path, LOOKUP_PARENT, nd)) { 502 if (vfs_path_lookup(mnt->mnt_root, mnt, pathname, flags, nd)) {
503 printk(KERN_WARNING "%s: %s failed to find path %s\n", 503 printk(KERN_WARNING "%s: %s failed to find path %s\n",
504 __FILE__, __func__, path); 504 __FILE__, __func__, pathname);
505 rpc_put_mount(); 505 rpc_put_mount();
506 return -ENOENT; 506 return -ENOENT;
507 } 507 }
508 return 0; 508 return 0;
509} 509}
510 510
511static int rpc_lookup_parent(const char *pathname, struct nameidata *nd)
512{
513 return __rpc_lookup_path(pathname, LOOKUP_PARENT, nd);
514}
515
511static void 516static void
512rpc_release_path(struct nameidata *nd) 517rpc_release_path(struct nameidata *nd)
513{ 518{