summaryrefslogtreecommitdiffstats
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, 3 insertions, 3 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index f8893dc6a989..e42c9abfeaa8 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -275,7 +275,7 @@ int __mnt_is_readonly(struct vfsmount *mnt)
275{ 275{
276 if (mnt->mnt_flags & MNT_READONLY) 276 if (mnt->mnt_flags & MNT_READONLY)
277 return 1; 277 return 1;
278 if (mnt->mnt_sb->s_flags & MS_RDONLY) 278 if (sb_rdonly(mnt->mnt_sb))
279 return 1; 279 return 1;
280 return 0; 280 return 0;
281} 281}
@@ -1534,7 +1534,7 @@ static int do_umount(struct mount *mnt, int flags)
1534 if (!capable(CAP_SYS_ADMIN)) 1534 if (!capable(CAP_SYS_ADMIN))
1535 return -EPERM; 1535 return -EPERM;
1536 down_write(&sb->s_umount); 1536 down_write(&sb->s_umount);
1537 if (!(sb->s_flags & MS_RDONLY)) 1537 if (!sb_rdonly(sb))
1538 retval = do_remount_sb(sb, MS_RDONLY, NULL, 0); 1538 retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
1539 up_write(&sb->s_umount); 1539 up_write(&sb->s_umount);
1540 return retval; 1540 return retval;
@@ -3300,7 +3300,7 @@ static bool mnt_already_visible(struct mnt_namespace *ns, struct vfsmount *new,
3300 mnt_flags = mnt->mnt.mnt_flags; 3300 mnt_flags = mnt->mnt.mnt_flags;
3301 3301
3302 /* Don't miss readonly hidden in the superblock flags */ 3302 /* Don't miss readonly hidden in the superblock flags */
3303 if (mnt->mnt.mnt_sb->s_flags & MS_RDONLY) 3303 if (sb_rdonly(mnt->mnt.mnt_sb))
3304 mnt_flags |= MNT_LOCK_READONLY; 3304 mnt_flags |= MNT_LOCK_READONLY;
3305 3305
3306 /* Verify the mount flags are equal to or more permissive 3306 /* Verify the mount flags are equal to or more permissive