]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: factor out btree page submission code to a helper
authorQu Wenruo <wqu@suse.com>
Wed, 2 Dec 2020 06:48:00 +0000 (14:48 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Dec 2020 18:16:10 +0000 (19:16 +0100)
commiteb479df96a5067fcf241c78feda50ae39b930683
tree80cb3b16dca1ce2cf967df046cbdb6d02998029e
parentc0745944ec2f9c14f41a85c69fd10cd8ddc2057f
btrfs: factor out btree page submission code to a helper

In btree_write_cache_pages() we have a btree page submission routine
buried deeply in a nested loop.

This patch will extract that part of code into a helper function,
submit_eb_page(), to do the same work.

Since submit_eb_page() now can return >0 for successful extent
buffer submission, remove the "ASSERT(ret <= 0);" line.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
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