aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-09-13 13:31:14 +0800
committerDavid Sterba <dsterba@suse.com>2022-09-26 12:28:07 +0200
commit5467abba1cbd9e10be5b44a12ce42b6af08ba38b (patch)
treec30ab26b826e474d7a4f2d57ca8f35580a80a1c9 /fs/btrfs/disk-io.h
parent209ecde55c4a642c988f0beba0dfaaa260ab034d (diff)
btrfs: move end_io_func argument to btrfs_bio_ctrl structure
For function submit_extent_page() and alloc_new_bio(), we have an argument @end_io_func to indicate the end io function. But that function never change inside any call site of them, thus no need to pass the pointer around everywhere. There is a better match for the lifespan of all the call sites, as we have btrfs_bio_ctrl structure, thus we can put the endio function pointer there, and grab the pointer every time we allocate a new bio. Also add extra ASSERT()s to make sure every call site of submit_extent_page() and alloc_new_bio() has properly set the pointer inside btrfs_bio_ctrl. This removes one argument from the already long argument list of submit_extent_page(). Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
0 files changed, 0 insertions, 0 deletions