summaryrefslogtreecommitdiffstats
path: root/fs/hfs/mdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfs/mdb.c')
-rw-r--r--fs/hfs/mdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c
index 482081bcdf70..894994d2c885 100644
--- a/fs/hfs/mdb.c
+++ b/fs/hfs/mdb.c
@@ -210,7 +210,7 @@ int hfs_mdb_get(struct super_block *sb)
210 pr_warn("filesystem is marked locked, mounting read-only.\n"); 210 pr_warn("filesystem is marked locked, mounting read-only.\n");
211 sb->s_flags |= MS_RDONLY; 211 sb->s_flags |= MS_RDONLY;
212 } 212 }
213 if (!(sb->s_flags & MS_RDONLY)) { 213 if (!sb_rdonly(sb)) {
214 /* Mark the volume uncleanly unmounted in case we crash */ 214 /* Mark the volume uncleanly unmounted in case we crash */
215 attrib &= cpu_to_be16(~HFS_SB_ATTRIB_UNMNT); 215 attrib &= cpu_to_be16(~HFS_SB_ATTRIB_UNMNT);
216 attrib |= cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT); 216 attrib |= cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT);
@@ -259,7 +259,7 @@ void hfs_mdb_commit(struct super_block *sb)
259{ 259{
260 struct hfs_mdb *mdb = HFS_SB(sb)->mdb; 260 struct hfs_mdb *mdb = HFS_SB(sb)->mdb;
261 261
262 if (sb->s_flags & MS_RDONLY) 262 if (sb_rdonly(sb))
263 return; 263 return;
264 264
265 lock_buffer(HFS_SB(sb)->mdb_bh); 265 lock_buffer(HFS_SB(sb)->mdb_bh);
@@ -334,7 +334,7 @@ void hfs_mdb_commit(struct super_block *sb)
334void hfs_mdb_close(struct super_block *sb) 334void hfs_mdb_close(struct super_block *sb)
335{ 335{
336 /* update volume attributes */ 336 /* update volume attributes */
337 if (sb->s_flags & MS_RDONLY) 337 if (sb_rdonly(sb))
338 return; 338 return;
339 HFS_SB(sb)->mdb->drAtrb |= cpu_to_be16(HFS_SB_ATTRIB_UNMNT); 339 HFS_SB(sb)->mdb->drAtrb |= cpu_to_be16(HFS_SB_ATTRIB_UNMNT);
340 HFS_SB(sb)->mdb->drAtrb &= cpu_to_be16(~HFS_SB_ATTRIB_INCNSTNT); 340 HFS_SB(sb)->mdb->drAtrb &= cpu_to_be16(~HFS_SB_ATTRIB_INCNSTNT);