diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 6 | ||||
-rw-r--r-- | fs/namespace.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index c006bc61d1ea..527119afb6a5 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -702,7 +702,7 @@ static int __follow_mount(struct path *path) | |||
702 | { | 702 | { |
703 | int res = 0; | 703 | int res = 0; |
704 | while (d_mountpoint(path->dentry)) { | 704 | while (d_mountpoint(path->dentry)) { |
705 | struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry); | 705 | struct vfsmount *mounted = lookup_mnt(path); |
706 | if (!mounted) | 706 | if (!mounted) |
707 | break; | 707 | break; |
708 | dput(path->dentry); | 708 | dput(path->dentry); |
@@ -718,7 +718,7 @@ static int __follow_mount(struct path *path) | |||
718 | static void follow_mount(struct path *path) | 718 | static void follow_mount(struct path *path) |
719 | { | 719 | { |
720 | while (d_mountpoint(path->dentry)) { | 720 | while (d_mountpoint(path->dentry)) { |
721 | struct vfsmount *mounted = lookup_mnt(path->mnt, path->dentry); | 721 | struct vfsmount *mounted = lookup_mnt(path); |
722 | if (!mounted) | 722 | if (!mounted) |
723 | break; | 723 | break; |
724 | dput(path->dentry); | 724 | dput(path->dentry); |
@@ -735,7 +735,7 @@ int follow_down(struct path *path) | |||
735 | { | 735 | { |
736 | struct vfsmount *mounted; | 736 | struct vfsmount *mounted; |
737 | 737 | ||
738 | mounted = lookup_mnt(path->mnt, path->dentry); | 738 | mounted = lookup_mnt(path); |
739 | if (mounted) { | 739 | if (mounted) { |
740 | dput(path->dentry); | 740 | dput(path->dentry); |
741 | mntput(path->mnt); | 741 | mntput(path->mnt); |
diff --git a/fs/namespace.c b/fs/namespace.c index ba5237be1cf9..b94ad3d685ff 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -442,11 +442,11 @@ struct vfsmount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry, | |||
442 | * lookup_mnt increments the ref count before returning | 442 | * lookup_mnt increments the ref count before returning |
443 | * the vfsmount struct. | 443 | * the vfsmount struct. |
444 | */ | 444 | */ |
445 | struct vfsmount *lookup_mnt(struct vfsmount *mnt, struct dentry *dentry) | 445 | struct vfsmount *lookup_mnt(struct path *path) |
446 | { | 446 | { |
447 | struct vfsmount *child_mnt; | 447 | struct vfsmount *child_mnt; |
448 | spin_lock(&vfsmount_lock); | 448 | spin_lock(&vfsmount_lock); |
449 | if ((child_mnt = __lookup_mnt(mnt, dentry, 1))) | 449 | if ((child_mnt = __lookup_mnt(path->mnt, path->dentry, 1))) |
450 | mntget(child_mnt); | 450 | mntget(child_mnt); |
451 | spin_unlock(&vfsmount_lock); | 451 | spin_unlock(&vfsmount_lock); |
452 | return child_mnt; | 452 | return child_mnt; |