From 2ff7e61e0d30ff166a2ae94575526bffe11fd1a8 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Wed, 22 Jun 2016 18:54:24 -0400 Subject: btrfs: take an fs_info directly when the root is not used otherwise There are loads of functions in btrfs that accept a root parameter but only use it to obtain an fs_info pointer. Let's convert those to just accept an fs_info pointer directly. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba --- fs/btrfs/check-integrity.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fs/btrfs/check-integrity.c') diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index 137883cce13c..ab14c2e635ca 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c @@ -2904,14 +2904,13 @@ int btrfsic_submit_bio_wait(struct bio *bio) return submit_bio_wait(bio); } -int btrfsic_mount(struct btrfs_root *root, +int btrfsic_mount(struct btrfs_fs_info *fs_info, struct btrfs_fs_devices *fs_devices, int including_extent_data, u32 print_mask) { int ret; struct btrfsic_state *state; struct list_head *dev_head = &fs_devices->devices; - struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_device *device; if (fs_info->nodesize & ((u64)PAGE_SIZE - 1)) { @@ -2939,7 +2938,7 @@ int btrfsic_mount(struct btrfs_root *root, btrfsic_is_initialized = 1; } mutex_lock(&btrfsic_mutex); - state->fs_info = root->fs_info; + state->fs_info = fs_info; state->print_mask = print_mask; state->include_extent_data = including_extent_data; state->csum_size = 0; @@ -2977,7 +2976,7 @@ int btrfsic_mount(struct btrfs_root *root, ret = btrfsic_process_superblock(state, fs_devices); if (0 != ret) { mutex_unlock(&btrfsic_mutex); - btrfsic_unmount(root, fs_devices); + btrfsic_unmount(fs_devices); return ret; } @@ -2990,8 +2989,7 @@ int btrfsic_mount(struct btrfs_root *root, return 0; } -void btrfsic_unmount(struct btrfs_root *root, - struct btrfs_fs_devices *fs_devices) +void btrfsic_unmount(struct btrfs_fs_devices *fs_devices) { struct btrfsic_block *b_all, *tmp_all; struct btrfsic_state *state; -- cgit v1.2.3