]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/hfsplus/super.c
VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)
[mirror_ubuntu-bionic-kernel.git] / fs / hfsplus / super.c
index 67aedf4c2e7c5b6a82f1caf4ef861549b31b5581..e5bb2de2262ae68c64a061673f93220ae8872383 100644 (file)
@@ -264,7 +264,7 @@ void hfsplus_mark_mdb_dirty(struct super_block *sb)
        struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
        unsigned long delay;
 
-       if (sb->s_flags & MS_RDONLY)
+       if (sb_rdonly(sb))
                return;
 
        spin_lock(&sbi->work_lock);
@@ -284,7 +284,7 @@ static void hfsplus_put_super(struct super_block *sb)
 
        cancel_delayed_work_sync(&sbi->sync_work);
 
-       if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) {
+       if (!sb_rdonly(sb) && sbi->s_vhdr) {
                struct hfsplus_vh *vhdr = sbi->s_vhdr;
 
                vhdr->modify_date = hfsp_now2mt();
@@ -329,7 +329,7 @@ static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf)
 static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
 {
        sync_filesystem(sb);
-       if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
+       if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb))
                return 0;
        if (!(*flags & MS_RDONLY)) {
                struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr;
@@ -462,7 +462,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
                pr_warn("Filesystem is marked locked, mounting read-only.\n");
                sb->s_flags |= MS_RDONLY;
        } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) &&
-                       !(sb->s_flags & MS_RDONLY)) {
+                       !sb_rdonly(sb)) {
                pr_warn("write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.\n");
                sb->s_flags |= MS_RDONLY;
        }
@@ -535,7 +535,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
        } else
                hfs_find_exit(&fd);
 
-       if (!(sb->s_flags & MS_RDONLY)) {
+       if (!sb_rdonly(sb)) {
                /*
                 * H+LX == hfsplusutils, H+Lx == this driver, H+lx is unused
                 * all three are registered with Apple for our use