diff options
-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 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 | ||
487 | static int | 487 | static int __rpc_lookup_path(const char *pathname, unsigned flags, |
488 | rpc_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 | ||
511 | static int rpc_lookup_parent(const char *pathname, struct nameidata *nd) | ||
512 | { | ||
513 | return __rpc_lookup_path(pathname, LOOKUP_PARENT, nd); | ||
514 | } | ||
515 | |||
511 | static void | 516 | static void |
512 | rpc_release_path(struct nameidata *nd) | 517 | rpc_release_path(struct nameidata *nd) |
513 | { | 518 | { |