aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 50ee30345b4f..6d3a1963879b 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2493,6 +2493,7 @@ EXPORT_SYMBOL(create_mnt_ns);
2493struct dentry *mount_subtree(struct vfsmount *mnt, const char *name) 2493struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
2494{ 2494{
2495 struct mnt_namespace *ns; 2495 struct mnt_namespace *ns;
2496 struct super_block *s;
2496 struct path path; 2497 struct path path;
2497 int err; 2498 int err;
2498 2499
@@ -2509,10 +2510,11 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
2509 return ERR_PTR(err); 2510 return ERR_PTR(err);
2510 2511
2511 /* trade a vfsmount reference for active sb one */ 2512 /* trade a vfsmount reference for active sb one */
2512 atomic_inc(&path.mnt->mnt_sb->s_active); 2513 s = path.mnt->mnt_sb;
2514 atomic_inc(&s->s_active);
2513 mntput(path.mnt); 2515 mntput(path.mnt);
2514 /* lock the sucker */ 2516 /* lock the sucker */
2515 down_write(&path.mnt->mnt_sb->s_umount); 2517 down_write(&s->s_umount);
2516 /* ... and return the root of (sub)tree on it */ 2518 /* ... and return the root of (sub)tree on it */
2517 return path.dentry; 2519 return path.dentry;
2518} 2520}