aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-24 18:22:03 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:56:58 -0500
commitc71053659e3bb27d44b79da0bb4abf5838c2060a (patch)
tree59e86cc1602db35ffc2c3991953161f1619706b1 /fs/namei.c
parent7d6fec45a5131918b51dcd76da52f2ec86a85be6 (diff)
vfs: spread struct mount - __lookup_mnt() result
switch __lookup_mnt() to returning struct mount *; callers adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 5008f01787f5..d1c6a559f8f0 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -36,6 +36,7 @@
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37 37
38#include "internal.h" 38#include "internal.h"
39#include "mount.h"
39 40
40/* [Feb-1997 T. Schoebel-Theuer] 41/* [Feb-1997 T. Schoebel-Theuer]
41 * Fundamental changes in the pathname lookup mechanisms (namei) 42 * Fundamental changes in the pathname lookup mechanisms (namei)
@@ -884,7 +885,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
884 struct inode **inode) 885 struct inode **inode)
885{ 886{
886 for (;;) { 887 for (;;) {
887 struct vfsmount *mounted; 888 struct mount *mounted;
888 /* 889 /*
889 * Don't forget we might have a non-mountpoint managed dentry 890 * Don't forget we might have a non-mountpoint managed dentry
890 * that wants to block transit. 891 * that wants to block transit.
@@ -898,8 +899,8 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
898 mounted = __lookup_mnt(path->mnt, path->dentry, 1); 899 mounted = __lookup_mnt(path->mnt, path->dentry, 1);
899 if (!mounted) 900 if (!mounted)
900 break; 901 break;
901 path->mnt = mounted; 902 path->mnt = &mounted->mnt;
902 path->dentry = mounted->mnt_root; 903 path->dentry = mounted->mnt.mnt_root;
903 nd->flags |= LOOKUP_JUMPED; 904 nd->flags |= LOOKUP_JUMPED;
904 nd->seq = read_seqcount_begin(&path->dentry->d_seq); 905 nd->seq = read_seqcount_begin(&path->dentry->d_seq);
905 /* 906 /*
@@ -915,12 +916,12 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
915static void follow_mount_rcu(struct nameidata *nd) 916static void follow_mount_rcu(struct nameidata *nd)
916{ 917{
917 while (d_mountpoint(nd->path.dentry)) { 918 while (d_mountpoint(nd->path.dentry)) {
918 struct vfsmount *mounted; 919 struct mount *mounted;
919 mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry, 1); 920 mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry, 1);
920 if (!mounted) 921 if (!mounted)
921 break; 922 break;
922 nd->path.mnt = mounted; 923 nd->path.mnt = &mounted->mnt;
923 nd->path.dentry = mounted->mnt_root; 924 nd->path.dentry = mounted->mnt.mnt_root;
924 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq); 925 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
925 } 926 }
926} 927}