Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[sfrench/cifs-2.6.git] / fs / btrfs / volumes.c
index c188256a367c99ebdcff970ce13147e4365a2cbd..b39737568c223c208d92b2f4ab73ac0263ad3ff4 100644 (file)
@@ -2324,7 +2324,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
        int seeding_dev = 0;
        int ret = 0;
 
-       if ((sb->s_flags & MS_RDONLY) && !fs_info->fs_devices->seeding)
+       if (sb_rdonly(sb) && !fs_info->fs_devices->seeding)
                return -EROFS;
 
        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)
 
 int btrfs_cancel_balance(struct btrfs_fs_info *fs_info)
 {
-       if (fs_info->sb->s_flags & MS_RDONLY)
+       if (sb_rdonly(fs_info->sb))
                return -EROFS;
 
        mutex_lock(&fs_info->balance_mutex);
@@ -6166,7 +6166,7 @@ blk_status_t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
        map_length = length;
 
        btrfs_bio_counter_inc_blocked(fs_info);
-       ret = __btrfs_map_block(fs_info, bio_op(bio), logical,
+       ret = __btrfs_map_block(fs_info, btrfs_op(bio), logical,
                                &map_length, &bbio, mirror_num, 1);
        if (ret) {
                btrfs_bio_counter_dec(fs_info);