]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/btrfs/volumes.c
VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)
[mirror_ubuntu-bionic-kernel.git] / fs / btrfs / volumes.c
index 5eb7217738edbba5a49237736c3263b9b044d46f..6646695c90720b3d330ac23a75cb8c7c38957497 100644 (file)
@@ -2337,7 +2337,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,
@@ -4085,7 +4085,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);