aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/vfs.txt6
-rw-r--r--fs/autofs4/root.c6
-rw-r--r--fs/namei.c7
-rw-r--r--include/linux/dcache.h2
4 files changed, 8 insertions, 13 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index ef0714aa8e40..306f0ae8df09 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -873,7 +873,7 @@ struct dentry_operations {
873 void (*d_iput)(struct dentry *, struct inode *); 873 void (*d_iput)(struct dentry *, struct inode *);
874 char *(*d_dname)(struct dentry *, char *, int); 874 char *(*d_dname)(struct dentry *, char *, int);
875 struct vfsmount *(*d_automount)(struct path *); 875 struct vfsmount *(*d_automount)(struct path *);
876 int (*d_manage)(struct dentry *, bool, bool); 876 int (*d_manage)(struct dentry *, bool);
877}; 877};
878 878
879 d_revalidate: called when the VFS needs to revalidate a dentry. This 879 d_revalidate: called when the VFS needs to revalidate a dentry. This
@@ -969,10 +969,6 @@ struct dentry_operations {
969 mounted on it and not to check the automount flag. Any other error 969 mounted on it and not to check the automount flag. Any other error
970 code will abort pathwalk completely. 970 code will abort pathwalk completely.
971 971
972 If the 'mounting_here' parameter is true, then namespace_sem is being
973 held by the caller and the function should not initiate any mounts or
974 unmounts that it will then wait for.
975
976 If the 'rcu_walk' parameter is true, then the caller is doing a 972 If the 'rcu_walk' parameter is true, then the caller is doing a
977 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, 973 pathwalk in RCU-walk mode. Sleeping is not permitted in this mode,
978 and the caller can be asked to leave it and call again by returing 974 and the caller can be asked to leave it and call again by returing
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 014e7aba3b08..e6f84d26f4cf 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -36,7 +36,7 @@ static long autofs4_root_compat_ioctl(struct file *,unsigned int,unsigned long);
36static int autofs4_dir_open(struct inode *inode, struct file *file); 36static int autofs4_dir_open(struct inode *inode, struct file *file);
37static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); 37static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
38static struct vfsmount *autofs4_d_automount(struct path *); 38static struct vfsmount *autofs4_d_automount(struct path *);
39static int autofs4_d_manage(struct dentry *, bool, bool); 39static int autofs4_d_manage(struct dentry *, bool);
40static void autofs4_dentry_release(struct dentry *); 40static void autofs4_dentry_release(struct dentry *);
41 41
42const struct file_operations autofs4_root_operations = { 42const struct file_operations autofs4_root_operations = {
@@ -446,7 +446,7 @@ done:
446 return NULL; 446 return NULL;
447} 447}
448 448
449int autofs4_d_manage(struct dentry *dentry, bool mounting_here, bool rcu_walk) 449int autofs4_d_manage(struct dentry *dentry, bool rcu_walk)
450{ 450{
451 struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); 451 struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
452 452
@@ -454,7 +454,7 @@ int autofs4_d_manage(struct dentry *dentry, bool mounting_here, bool rcu_walk)
454 dentry, dentry->d_name.len, dentry->d_name.name); 454 dentry, dentry->d_name.len, dentry->d_name.name);
455 455
456 /* The daemon never waits. */ 456 /* The daemon never waits. */
457 if (autofs4_oz_mode(sbi) || mounting_here) { 457 if (autofs4_oz_mode(sbi)) {
458 if (!d_mountpoint(dentry)) 458 if (!d_mountpoint(dentry))
459 return -EISDIR; 459 return -EISDIR;
460 return 0; 460 return 0;
diff --git a/fs/namei.c b/fs/namei.c
index e092648a068c..5a9a6c3094da 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -933,8 +933,7 @@ static int follow_managed(struct path *path, unsigned flags)
933 if (managed & DCACHE_MANAGE_TRANSIT) { 933 if (managed & DCACHE_MANAGE_TRANSIT) {
934 BUG_ON(!path->dentry->d_op); 934 BUG_ON(!path->dentry->d_op);
935 BUG_ON(!path->dentry->d_op->d_manage); 935 BUG_ON(!path->dentry->d_op->d_manage);
936 ret = path->dentry->d_op->d_manage(path->dentry, 936 ret = path->dentry->d_op->d_manage(path->dentry, false);
937 false, false);
938 if (ret < 0) 937 if (ret < 0)
939 return ret == -EISDIR ? 0 : ret; 938 return ret == -EISDIR ? 0 : ret;
940 } 939 }
@@ -999,7 +998,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
999 struct vfsmount *mounted; 998 struct vfsmount *mounted;
1000 if (unlikely(path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) && 999 if (unlikely(path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) &&
1001 !reverse_transit && 1000 !reverse_transit &&
1002 path->dentry->d_op->d_manage(path->dentry, false, true) < 0) 1001 path->dentry->d_op->d_manage(path->dentry, true) < 0)
1003 return false; 1002 return false;
1004 mounted = __lookup_mnt(path->mnt, path->dentry, 1); 1003 mounted = __lookup_mnt(path->mnt, path->dentry, 1);
1005 if (!mounted) 1004 if (!mounted)
@@ -1086,7 +1085,7 @@ int follow_down(struct path *path)
1086 BUG_ON(!path->dentry->d_op); 1085 BUG_ON(!path->dentry->d_op);
1087 BUG_ON(!path->dentry->d_op->d_manage); 1086 BUG_ON(!path->dentry->d_op->d_manage);
1088 ret = path->dentry->d_op->d_manage( 1087 ret = path->dentry->d_op->d_manage(
1089 path->dentry, false, false); 1088 path->dentry, false);
1090 if (ret < 0) 1089 if (ret < 0)
1091 return ret == -EISDIR ? 0 : ret; 1090 return ret == -EISDIR ? 0 : ret;
1092 } 1091 }
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index f958c19e3ca5..1a87760d6532 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -168,7 +168,7 @@ struct dentry_operations {
168 void (*d_iput)(struct dentry *, struct inode *); 168 void (*d_iput)(struct dentry *, struct inode *);
169 char *(*d_dname)(struct dentry *, char *, int); 169 char *(*d_dname)(struct dentry *, char *, int);
170 struct vfsmount *(*d_automount)(struct path *); 170 struct vfsmount *(*d_automount)(struct path *);
171 int (*d_manage)(struct dentry *, bool, bool); 171 int (*d_manage)(struct dentry *, bool);
172} ____cacheline_aligned; 172} ____cacheline_aligned;
173 173
174/* 174/*