]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: handle bio_split() errors
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 3 Dec 2024 07:40:22 +0000 (23:40 -0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 6 Dec 2024 14:04:13 +0000 (15:04 +0100)
commitc7c97ceff98cc459bf5e358e5cbd06fcb651d501
tree77a64a1ff462447e1153356077015939c11f16fa
parentc83d77eb0f216867e44da6b257b129582ba23287
btrfs: handle bio_split() errors

Commit e546fe1da9bd ("block: Rework bio_split() return value") changed
bio_split() so that it can return errors.

Add error handling for it in btrfs_split_bio() and ultimately
btrfs_submit_chunk(). As the bio is not submitted, the bio counter must
be decremented to pair btrfs_bio_counter_inc_blocked().

Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c