aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index a72eaabfe8f2..8a415c9c5e55 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -595,7 +595,7 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root,
595 goto out_free; 595 goto out_free;
596 } 596 }
597 597
598 mnt->mnt_flags = old->mnt_flags; 598 mnt->mnt_flags = old->mnt_flags & ~MNT_WRITE_HOLD;
599 atomic_inc(&sb->s_active); 599 atomic_inc(&sb->s_active);
600 mnt->mnt_sb = sb; 600 mnt->mnt_sb = sb;
601 mnt->mnt_root = dget(root); 601 mnt->mnt_root = dget(root);
@@ -1744,9 +1744,7 @@ static int do_new_mount(struct path *path, char *type, int flags,
1744 if (!capable(CAP_SYS_ADMIN)) 1744 if (!capable(CAP_SYS_ADMIN))
1745 return -EPERM; 1745 return -EPERM;
1746 1746
1747 lock_kernel();
1748 mnt = do_kern_mount(type, flags, name, data); 1747 mnt = do_kern_mount(type, flags, name, data);
1749 unlock_kernel();
1750 if (IS_ERR(mnt)) 1748 if (IS_ERR(mnt))
1751 return PTR_ERR(mnt); 1749 return PTR_ERR(mnt);
1752 1750