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 5eb7217738ed..6646695c9072 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2337,7 +2337,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path | |||
2337 | int seeding_dev = 0; | 2337 | int seeding_dev = 0; |
2338 | int ret = 0; | 2338 | int ret = 0; |
2339 | 2339 | ||
2340 | if ((sb->s_flags & MS_RDONLY) && !fs_info->fs_devices->seeding) | 2340 | if (sb_rdonly(sb) && !fs_info->fs_devices->seeding) |
2341 | return -EROFS; | 2341 | return -EROFS; |
2342 | 2342 | ||
2343 | bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, | 2343 | bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL, |
@@ -4085,7 +4085,7 @@ int btrfs_pause_balance(struct btrfs_fs_info *fs_info) | |||
4085 | 4085 | ||
4086 | int btrfs_cancel_balance(struct btrfs_fs_info *fs_info) | 4086 | int btrfs_cancel_balance(struct btrfs_fs_info *fs_info) |
4087 | { | 4087 | { |
4088 | if (fs_info->sb->s_flags & MS_RDONLY) | 4088 | if (sb_rdonly(fs_info->sb)) |
4089 | return -EROFS; | 4089 | return -EROFS; |
4090 | 4090 | ||
4091 | mutex_lock(&fs_info->balance_mutex); | 4091 | mutex_lock(&fs_info->balance_mutex); |