From 474a00ee1306eb7e82329fdc28b6471a99facba1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 17 Mar 2011 21:31:32 -0400 Subject: kill simple_set_mnt() not needed anymore, since all users (->get_sb() instances) are gone. Signed-off-by: Al Viro --- include/linux/fs.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 92f7e04aea1..7061a8587ee 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1839,7 +1839,6 @@ extern struct dentry *mount_pseudo(struct file_system_type *, char *, const struct super_operations *ops, const struct dentry_operations *dops, unsigned long); -extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); static inline void sb_mark_dirty(struct super_block *sb) { -- cgit v1.2.3-70-g09d2 From 7cc90cc3ffe22a0d81b8d605b20a82ec7911012d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 18 Mar 2011 09:04:20 -0400 Subject: don't pass 'mounting_here' flag to follow_down() it's always false now Signed-off-by: Al Viro --- fs/namei.c | 4 ++-- fs/nfsd/vfs.c | 2 +- include/linux/namei.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/fs/namei.c b/fs/namei.c index b912b7abe74..e092648a068 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1065,7 +1065,7 @@ failed: * Care must be taken as namespace_sem may be held (indicated by mounting_here * being true). */ -int follow_down(struct path *path, bool mounting_here) +int follow_down(struct path *path) { unsigned managed; int ret; @@ -1086,7 +1086,7 @@ int follow_down(struct path *path, bool mounting_here) BUG_ON(!path->dentry->d_op); BUG_ON(!path->dentry->d_op->d_manage); ret = path->dentry->d_op->d_manage( - path->dentry, mounting_here, false); + path->dentry, false, false); if (ret < 0) return ret == -EISDIR ? 0 : ret; } diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index da1d9701f8e..ff93025ae2f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -87,7 +87,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, .dentry = dget(dentry)}; int err = 0; - err = follow_down(&path, false); + err = follow_down(&path); if (err < 0) goto out; diff --git a/include/linux/namei.h b/include/linux/namei.h index 9c8603872c3..eba45ea1029 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -85,7 +85,7 @@ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry extern struct dentry *lookup_one_len(const char *, struct dentry *, int); extern int follow_down_one(struct path *); -extern int follow_down(struct path *, bool); +extern int follow_down(struct path *); extern int follow_up(struct path *); extern struct dentry *lock_rename(struct dentry *, struct dentry *); -- cgit v1.2.3-70-g09d2 From 1aed3e4204dd787d53b3cd6363eb63bb4900c38e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 18 Mar 2011 09:09:02 -0400 Subject: lose 'mounting_here' argument in ->d_manage() it's always false... Signed-off-by: Al Viro --- Documentation/filesystems/vfs.txt | 6 +----- fs/autofs4/root.c | 6 +++--- fs/namei.c | 7 +++---- include/linux/dcache.h | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) (limited to 'include/linux') diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index ef0714aa8e4..306f0ae8df0 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -873,7 +873,7 @@ struct dentry_operations { void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)(struct dentry *, char *, int); struct vfsmount *(*d_automount)(struct path *); - int (*d_manage)(struct dentry *, bool, bool); + int (*d_manage)(struct dentry *, bool); }; d_revalidate: called when the VFS needs to revalidate a dentry. This @@ -969,10 +969,6 @@ struct dentry_operations { mounted on it and not to check the automount flag. Any other error code will abort pathwalk completely. - If the 'mounting_here' parameter is true, then namespace_sem is being - held by the caller and the function should not initiate any mounts or - unmounts that it will then wait for. - If the 'rcu_walk' parameter is true, then the caller is doing a pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, 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 014e7aba3b0..e6f84d26f4c 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); static int autofs4_dir_open(struct inode *inode, struct file *file); static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); static struct vfsmount *autofs4_d_automount(struct path *); -static int autofs4_d_manage(struct dentry *, bool, bool); +static int autofs4_d_manage(struct dentry *, bool); static void autofs4_dentry_release(struct dentry *); const struct file_operations autofs4_root_operations = { @@ -446,7 +446,7 @@ done: return NULL; } -int autofs4_d_manage(struct dentry *dentry, bool mounting_here, bool rcu_walk) +int autofs4_d_manage(struct dentry *dentry, bool rcu_walk) { struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); @@ -454,7 +454,7 @@ int autofs4_d_manage(struct dentry *dentry, bool mounting_here, bool rcu_walk) dentry, dentry->d_name.len, dentry->d_name.name); /* The daemon never waits. */ - if (autofs4_oz_mode(sbi) || mounting_here) { + if (autofs4_oz_mode(sbi)) { if (!d_mountpoint(dentry)) return -EISDIR; return 0; diff --git a/fs/namei.c b/fs/namei.c index e092648a068..5a9a6c3094d 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -933,8 +933,7 @@ static int follow_managed(struct path *path, unsigned flags) if (managed & DCACHE_MANAGE_TRANSIT) { BUG_ON(!path->dentry->d_op); BUG_ON(!path->dentry->d_op->d_manage); - ret = path->dentry->d_op->d_manage(path->dentry, - false, false); + ret = path->dentry->d_op->d_manage(path->dentry, false); if (ret < 0) return ret == -EISDIR ? 0 : ret; } @@ -999,7 +998,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, struct vfsmount *mounted; if (unlikely(path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) && !reverse_transit && - path->dentry->d_op->d_manage(path->dentry, false, true) < 0) + path->dentry->d_op->d_manage(path->dentry, true) < 0) return false; mounted = __lookup_mnt(path->mnt, path->dentry, 1); if (!mounted) @@ -1086,7 +1085,7 @@ int follow_down(struct path *path) BUG_ON(!path->dentry->d_op); BUG_ON(!path->dentry->d_op->d_manage); ret = path->dentry->d_op->d_manage( - path->dentry, false, false); + path->dentry, false); if (ret < 0) return ret == -EISDIR ? 0 : ret; } diff --git a/include/linux/dcache.h b/include/linux/dcache.h index f958c19e3ca..1a87760d653 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -168,7 +168,7 @@ struct dentry_operations { void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)(struct dentry *, char *, int); struct vfsmount *(*d_automount)(struct path *); - int (*d_manage)(struct dentry *, bool, bool); + int (*d_manage)(struct dentry *, bool); } ____cacheline_aligned; /* -- cgit v1.2.3-70-g09d2