aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 080e2ebb8aa0..4a9b40f604fa 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2478,7 +2478,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
2478 return ret; 2478 return ret;
2479 } 2479 }
2480 2480
2481 if (fs_info->sb->s_flags & MS_RDONLY) { 2481 if (sb_rdonly(fs_info->sb)) {
2482 ret = btrfs_commit_super(fs_info); 2482 ret = btrfs_commit_super(fs_info);
2483 if (ret) 2483 if (ret)
2484 return ret; 2484 return ret;
@@ -2874,7 +2874,7 @@ int open_ctree(struct super_block *sb,
2874 2874
2875 features = btrfs_super_compat_ro_flags(disk_super) & 2875 features = btrfs_super_compat_ro_flags(disk_super) &
2876 ~BTRFS_FEATURE_COMPAT_RO_SUPP; 2876 ~BTRFS_FEATURE_COMPAT_RO_SUPP;
2877 if (!(sb->s_flags & MS_RDONLY) && features) { 2877 if (!sb_rdonly(sb) && features) {
2878 btrfs_err(fs_info, 2878 btrfs_err(fs_info,
2879 "cannot mount read-write because of unsupported optional features (%llx)", 2879 "cannot mount read-write because of unsupported optional features (%llx)",
2880 features); 2880 features);
@@ -3039,7 +3039,7 @@ retry_root_backup:
3039 btrfs_calc_num_tolerated_disk_barrier_failures(fs_info); 3039 btrfs_calc_num_tolerated_disk_barrier_failures(fs_info);
3040 if (fs_info->fs_devices->missing_devices > 3040 if (fs_info->fs_devices->missing_devices >
3041 fs_info->num_tolerated_disk_barrier_failures && 3041 fs_info->num_tolerated_disk_barrier_failures &&
3042 !(sb->s_flags & MS_RDONLY)) { 3042 !sb_rdonly(sb)) {
3043 btrfs_warn(fs_info, 3043 btrfs_warn(fs_info,
3044"missing devices (%llu) exceeds the limit (%d), writeable mount is not allowed", 3044"missing devices (%llu) exceeds the limit (%d), writeable mount is not allowed",
3045 fs_info->fs_devices->missing_devices, 3045 fs_info->fs_devices->missing_devices,
@@ -3102,7 +3102,7 @@ retry_root_backup:
3102 if (ret) 3102 if (ret)
3103 goto fail_qgroup; 3103 goto fail_qgroup;
3104 3104
3105 if (!(sb->s_flags & MS_RDONLY)) { 3105 if (!sb_rdonly(sb)) {
3106 ret = btrfs_cleanup_fs_roots(fs_info); 3106 ret = btrfs_cleanup_fs_roots(fs_info);
3107 if (ret) 3107 if (ret)
3108 goto fail_qgroup; 3108 goto fail_qgroup;
@@ -3128,7 +3128,7 @@ retry_root_backup:
3128 goto fail_qgroup; 3128 goto fail_qgroup;
3129 } 3129 }
3130 3130
3131 if (sb->s_flags & MS_RDONLY) 3131 if (sb_rdonly(sb))
3132 return 0; 3132 return 0;
3133 3133
3134 if (btrfs_test_opt(fs_info, CLEAR_CACHE) && 3134 if (btrfs_test_opt(fs_info, CLEAR_CACHE) &&
@@ -3928,7 +3928,7 @@ void close_ctree(struct btrfs_fs_info *fs_info)
3928 3928
3929 cancel_work_sync(&fs_info->async_reclaim_work); 3929 cancel_work_sync(&fs_info->async_reclaim_work);
3930 3930
3931 if (!(fs_info->sb->s_flags & MS_RDONLY)) { 3931 if (!sb_rdonly(fs_info->sb)) {
3932 /* 3932 /*
3933 * If the cleaner thread is stopped and there are 3933 * If the cleaner thread is stopped and there are
3934 * block groups queued for removal, the deletion will be 3934 * block groups queued for removal, the deletion will be