diff options
author | Christoph Hellwig <hch@lst.de> | 2023-01-21 07:50:27 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-02-15 19:38:53 +0100 |
commit | 285599b6fe15d642df643fd4383ab3a278374e35 (patch) | |
tree | 76f10a795615c82000509c4500e377684eccd957 /fs/btrfs/bio.c | |
parent | 48253076c3a93f795fcd84ffdc97c5e763709dee (diff) |
btrfs: remove the fs_info argument to btrfs_submit_bio
btrfs_submit_bio can derive it trivially from bbio->inode, so stop
bothering in the callers.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/bio.c')
-rw-r--r-- | fs/btrfs/bio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index de8634cf7bd8..1de40e064170 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -155,7 +155,7 @@ static void btrfs_end_repair_bio(struct btrfs_bio *repair_bbio, goto done; } - btrfs_submit_bio(fs_info, &repair_bbio->bio, mirror); + btrfs_submit_bio(&repair_bbio->bio, mirror); return; } @@ -223,7 +223,7 @@ static struct btrfs_failed_bio *repair_one_sector(struct btrfs_bio *failed_bbio, mirror = next_repair_mirror(fbio, failed_bbio->mirror_num); btrfs_debug(fs_info, "submitting repair read to mirror %d", mirror); - btrfs_submit_bio(fs_info, repair_bio, mirror); + btrfs_submit_bio(repair_bio, mirror); return fbio; } @@ -600,10 +600,10 @@ static bool btrfs_wq_submit_bio(struct btrfs_bio *bbio, return true; } -static bool btrfs_submit_chunk(struct btrfs_fs_info *fs_info, struct bio *bio, - int mirror_num) +static bool btrfs_submit_chunk(struct bio *bio, int mirror_num) { struct btrfs_bio *bbio = btrfs_bio(bio); + struct btrfs_fs_info *fs_info = bbio->inode->root->fs_info; struct btrfs_bio *orig_bbio = bbio; u64 logical = bio->bi_iter.bi_sector << 9; u64 length = bio->bi_iter.bi_size; @@ -676,9 +676,9 @@ fail: return true; } -void btrfs_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio, int mirror_num) +void btrfs_submit_bio(struct bio *bio, int mirror_num) { - while (!btrfs_submit_chunk(fs_info, bio, mirror_num)) + while (!btrfs_submit_chunk(bio, mirror_num)) ; } |