]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: concentrate the error handling of submit_one_sector()
authorQu Wenruo <wqu@suse.com>
Wed, 10 Dec 2025 08:32:33 +0000 (19:02 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 05:38:32 +0000 (06:38 +0100)
commit44820d80026e0b509007d41c83d42f1213ee8589
treeec9f665889048f7c1a2bfef5d243b640c9bbe9f4
parent3970da5c3ba0993eba8b83c63726f61ef97e3ae7
btrfs: concentrate the error handling of submit_one_sector()

Currently submit_one_sector() has only one failure path from
btrfs_get_extent().

However the error handling is split into two parts, one inside
submit_one_sector(), which clears the dirty flag and finishes the
writeback for the fs block.

The other part is to submit any remaining bio inside bio_ctrl and mark
the ordered extent finished for the fs block.

There is no special reason that we must split the error handling, let's
just concentrate all the error handling into submit_one_sector().

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c