diff options
-rw-r--r-- | fs/namespace.c | 2 | ||||
-rw-r--r-- | include/linux/mount.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index b3d8f51..912d273 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1842,7 +1842,7 @@ static int do_remount(struct path *path, int flags, int mnt_flags, err = do_remount_sb(sb, flags, data, 0); if (!err) { br_write_lock(vfsmount_lock); - mnt_flags |= path->mnt->mnt_flags & MNT_PROPAGATION_MASK; + mnt_flags |= path->mnt->mnt_flags & ~MNT_USER_SETTABLE_MASK; path->mnt->mnt_flags = mnt_flags; br_write_unlock(vfsmount_lock); } diff --git a/include/linux/mount.h b/include/linux/mount.h index 604f122..dacabd6 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -42,7 +42,9 @@ struct mnt_namespace; * flag, consider how it interacts with shared mounts. */ #define MNT_SHARED_MASK (MNT_UNBINDABLE) -#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) +#define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ + | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ + | MNT_READONLY) #define MNT_INTERNAL 0x4000 |