aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2025-06-11 10:03:03 +0000
committerDavid Sterba <[email protected]>2025-07-21 22:06:19 +0000
commit40426dd147ffde7087dc29c263b87e1a2a36ca38 (patch)
treee90b70fcaf621fd129a11c8bdb49bbb13c82ab1b /fs/btrfs/dev-replace.c
parentbtrfs: delay btrfs_open_devices() until super block is created (diff)
downloadkernel-40426dd147ffde7087dc29c263b87e1a2a36ca38.tar.gz
kernel-40426dd147ffde7087dc29c263b87e1a2a36ca38.zip
btrfs: use the super_block as holder when mounting file systems
The file system type is not a very useful holder as it doesn't allow us to go back to the actual file system instance. Pass the super_block instead which is useful when passed back to the file system driver. This matches what is done for all other block device based file systems, and allows us to remove btrfs_fs_info::bdev_holder completely. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r--fs/btrfs/dev-replace.c2
1 files changed, 1 insertions, 1 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);