diff options
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c188256a367c..0e8f16c305df 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2324,7 +2324,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path | |||
2324 | int seeding_dev = 0; | 2324 | int seeding_dev = 0; |
2325 | int ret = 0; | 2325 | int ret = 0; |
2326 | 2326 | ||
2327 | if ((sb->s_flags & MS_RDONLY) && !fs_info->fs_devices->seeding) | 2327 | if (sb_rdonly(sb) && !fs_info->fs_devices->seeding) |
2328 | return -EROFS; | 2328 | return -EROFS; |
2329 | 2329 | ||
2330 | bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, | 2330 | bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, |
@@ -4053,7 +4053,7 @@ int btrfs_pause_balance(struct btrfs_fs_info *fs_info) | |||
4053 | 4053 | ||
4054 | int btrfs_cancel_balance(struct btrfs_fs_info *fs_info) | 4054 | int btrfs_cancel_balance(struct btrfs_fs_info *fs_info) |
4055 | { | 4055 | { |
4056 | if (fs_info->sb->s_flags & MS_RDONLY) | 4056 | if (sb_rdonly(fs_info->sb)) |
4057 | return -EROFS; | 4057 | return -EROFS; |
4058 | 4058 | ||
4059 | mutex_lock(&fs_info->balance_mutex); | 4059 | mutex_lock(&fs_info->balance_mutex); |