diff options
-rw-r--r-- | fs/btrfs/dev-replace.c | 2 | ||||
-rw-r--r-- | fs/btrfs/fs.h | 2 | ||||
-rw-r--r-- | fs/btrfs/super.c | 3 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
4 files changed, 4 insertions, 7 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 473450ee0408..b828e4003552 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c @@ -250,7 +250,7 @@ static int btrfs_init_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, } bdev_file = bdev_file_open_by_path(device_path, BLK_OPEN_WRITE, - fs_info->bdev_holder, NULL); + fs_info->sb, NULL); if (IS_ERR(bdev_file)) { btrfs_err(fs_info, "target device %s is invalid!", device_path); return PTR_ERR(bdev_file); diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h index a731c883687d..5154ad390f31 100644 --- a/fs/btrfs/fs.h +++ b/fs/btrfs/fs.h @@ -715,8 +715,6 @@ struct btrfs_fs_info { u32 data_chunk_allocations; u32 metadata_ratio; - void *bdev_holder; - /* Private scrub information */ struct mutex scrub_lock; atomic_t scrubs_running; diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index e0ee96cc749c..212474f44216 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1925,7 +1925,7 @@ static int btrfs_get_tree_super(struct fs_context *fc) mutex_lock(&uuid_mutex); btrfs_fs_devices_dec_holding(fs_devices); - ret = btrfs_open_devices(fs_devices, mode, &btrfs_fs_type); + ret = btrfs_open_devices(fs_devices, mode, sb); if (ret < 0) fs_info->fs_devices = NULL; mutex_unlock(&uuid_mutex); @@ -1940,7 +1940,6 @@ static int btrfs_get_tree_super(struct fs_context *fc) bdev = fs_devices->latest_dev->bdev; snprintf(sb->s_id, sizeof(sb->s_id), "%pg", bdev); shrinker_debugfs_rename(sb->s_shrink, "sb-btrfs:%s", sb->s_id); - btrfs_sb(sb)->bdev_holder = &btrfs_fs_type; ret = btrfs_fill_super(sb, fs_devices); if (ret) { deactivate_locked_super(sb); diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index b974e2a84ed7..10b0d70293cb 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2705,7 +2705,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path return -EROFS; bdev_file = bdev_file_open_by_path(device_path, BLK_OPEN_WRITE, - fs_info->bdev_holder, NULL); + fs_info->sb, NULL); if (IS_ERR(bdev_file)) return PTR_ERR(bdev_file); @@ -7174,7 +7174,7 @@ static struct btrfs_fs_devices *open_seed_devices(struct btrfs_fs_info *fs_info, if (IS_ERR(fs_devices)) return fs_devices; - ret = open_fs_devices(fs_devices, BLK_OPEN_READ, fs_info->bdev_holder); + ret = open_fs_devices(fs_devices, BLK_OPEN_READ, fs_info->sb); if (ret) { free_fs_devices(fs_devices); return ERR_PTR(ret); |