summaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 462ac2e9258c..28039923114b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -675,7 +675,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
675 sbi->s_dmode = uopt.dmode; 675 sbi->s_dmode = uopt.dmode;
676 write_unlock(&sbi->s_cred_lock); 676 write_unlock(&sbi->s_cred_lock);
677 677
678 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) 678 if ((bool)(*flags & MS_RDONLY) == sb_rdonly(sb))
679 goto out_unlock; 679 goto out_unlock;
680 680
681 if (*flags & MS_RDONLY) 681 if (*flags & MS_RDONLY)
@@ -1019,7 +1019,7 @@ static int udf_load_metadata_files(struct super_block *sb, int partition,
1019 1019
1020 fe = udf_iget_special(sb, &addr); 1020 fe = udf_iget_special(sb, &addr);
1021 if (IS_ERR(fe)) { 1021 if (IS_ERR(fe)) {
1022 if (sb->s_flags & MS_RDONLY) 1022 if (sb_rdonly(sb))
1023 udf_warn(sb, "bitmap inode efe not found but it's ok since the disc is mounted read-only\n"); 1023 udf_warn(sb, "bitmap inode efe not found but it's ok since the disc is mounted read-only\n");
1024 else { 1024 else {
1025 udf_err(sb, "bitmap inode efe not found and attempted read-write mount\n"); 1025 udf_err(sb, "bitmap inode efe not found and attempted read-write mount\n");
@@ -1343,7 +1343,7 @@ static int udf_load_partdesc(struct super_block *sb, sector_t block)
1343 * writing to it (we overwrite blocks instead of relocating 1343 * writing to it (we overwrite blocks instead of relocating
1344 * them). 1344 * them).
1345 */ 1345 */
1346 if (!(sb->s_flags & MS_RDONLY)) { 1346 if (!sb_rdonly(sb)) {
1347 ret = -EACCES; 1347 ret = -EACCES;
1348 goto out_bh; 1348 goto out_bh;
1349 } 1349 }
@@ -2207,7 +2207,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2207 ret = -EINVAL; 2207 ret = -EINVAL;
2208 goto error_out; 2208 goto error_out;
2209 } else if (minUDFWriteRev > UDF_MAX_WRITE_VERSION && 2209 } else if (minUDFWriteRev > UDF_MAX_WRITE_VERSION &&
2210 !(sb->s_flags & MS_RDONLY)) { 2210 !sb_rdonly(sb)) {
2211 ret = -EACCES; 2211 ret = -EACCES;
2212 goto error_out; 2212 goto error_out;
2213 } 2213 }
@@ -2228,7 +2228,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2228 2228
2229 if (sbi->s_partmaps[sbi->s_partition].s_partition_flags & 2229 if (sbi->s_partmaps[sbi->s_partition].s_partition_flags &
2230 UDF_PART_FLAG_READ_ONLY && 2230 UDF_PART_FLAG_READ_ONLY &&
2231 !(sb->s_flags & MS_RDONLY)) { 2231 !sb_rdonly(sb)) {
2232 ret = -EACCES; 2232 ret = -EACCES;
2233 goto error_out; 2233 goto error_out;
2234 } 2234 }
@@ -2247,7 +2247,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2247 le16_to_cpu(ts.year), ts.month, ts.day, 2247 le16_to_cpu(ts.year), ts.month, ts.day,
2248 ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone)); 2248 ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone));
2249 } 2249 }
2250 if (!(sb->s_flags & MS_RDONLY)) { 2250 if (!sb_rdonly(sb)) {
2251 udf_open_lvid(sb); 2251 udf_open_lvid(sb);
2252 lvid_open = true; 2252 lvid_open = true;
2253 } 2253 }
@@ -2334,7 +2334,7 @@ static void udf_put_super(struct super_block *sb)
2334 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) 2334 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
2335 unload_nls(sbi->s_nls_map); 2335 unload_nls(sbi->s_nls_map);
2336#endif 2336#endif
2337 if (!(sb->s_flags & MS_RDONLY)) 2337 if (!sb_rdonly(sb))
2338 udf_close_lvid(sb); 2338 udf_close_lvid(sb);
2339 brelse(sbi->s_lvid_bh); 2339 brelse(sbi->s_lvid_bh);
2340 udf_sb_free_partitions(sb); 2340 udf_sb_free_partitions(sb);