]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/hfs/mdb.c
VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)
[mirror_ubuntu-bionic-kernel.git] / fs / hfs / mdb.c
index 482081bcdf70c86da21f22ca1c443373b7327180..894994d2c88501cfb27fc1f46561fcc21e4e0d1e 100644 (file)
@@ -210,7 +210,7 @@ int hfs_mdb_get(struct super_block *sb)
                pr_warn("filesystem is marked locked, mounting read-only.\n");
                sb->s_flags |= MS_RDONLY;
        }
-       if (!(sb->s_flags & MS_RDONLY)) {
+       if (!sb_rdonly(sb)) {
                /* Mark the volume uncleanly unmounted in case we crash */
                attrib &= cpu_to_be16(~HFS_SB_ATTRIB_UNMNT);
                attrib |= cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT);
@@ -259,7 +259,7 @@ void hfs_mdb_commit(struct super_block *sb)
 {
        struct hfs_mdb *mdb = HFS_SB(sb)->mdb;
 
-       if (sb->s_flags & MS_RDONLY)
+       if (sb_rdonly(sb))
                return;
 
        lock_buffer(HFS_SB(sb)->mdb_bh);
@@ -334,7 +334,7 @@ void hfs_mdb_commit(struct super_block *sb)
 void hfs_mdb_close(struct super_block *sb)
 {
        /* update volume attributes */
-       if (sb->s_flags & MS_RDONLY)
+       if (sb_rdonly(sb))
                return;
        HFS_SB(sb)->mdb->drAtrb |= cpu_to_be16(HFS_SB_ATTRIB_UNMNT);
        HFS_SB(sb)->mdb->drAtrb &= cpu_to_be16(~HFS_SB_ATTRIB_INCNSTNT);