diff options
author | 2025-04-23 17:57:17 +0200 | |
---|---|---|
committer | 2025-05-15 14:30:48 +0200 | |
commit | 64c13195dd82537c60dea8b2891beeb4db9a5cd5 (patch) | |
tree | b6c44e2b2b0913d13f7e3d0f41a103f50c32ef96 | |
parent | btrfs: change return type of btree_csum_one_bio() to int (diff) | |
download | wireguard-linux-64c13195dd82537c60dea8b2891beeb4db9a5cd5.tar.xz wireguard-linux-64c13195dd82537c60dea8b2891beeb4db9a5cd5.zip |
btrfs: change return type of btrfs_bio_csum() to int
The type blk_status_t is from block layer and not related to checksums
in our context. Use int internally and do the conversions to blk_status_t
as needed.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/bio.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 4ceb1bd511df..a534c6793e38 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -512,11 +512,11 @@ static void btrfs_submit_bio(struct bio *bio, struct btrfs_io_context *bioc, } } -static blk_status_t btrfs_bio_csum(struct btrfs_bio *bbio) +static int btrfs_bio_csum(struct btrfs_bio *bbio) { if (bbio->bio.bi_opf & REQ_META) - return errno_to_blk_status(btree_csum_one_bio(bbio)); - return errno_to_blk_status(btrfs_csum_one_bio(bbio)); + return btree_csum_one_bio(bbio); + return btrfs_csum_one_bio(bbio); } /* @@ -543,11 +543,11 @@ static void run_one_async_start(struct btrfs_work *work) { struct async_submit_bio *async = container_of(work, struct async_submit_bio, work); - blk_status_t ret; + int ret; ret = btrfs_bio_csum(async->bbio); if (ret) - async->bbio->bio.bi_status = ret; + async->bbio->bio.bi_status = errno_to_blk_status(ret); } /* @@ -748,7 +748,8 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num) btrfs_wq_submit_bio(bbio, bioc, &smap, mirror_num)) goto done; - ret = btrfs_bio_csum(bbio); + error = btrfs_bio_csum(bbio); + ret = errno_to_blk_status(error); if (ret) goto fail; } else if (use_append || |