]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: scrub: factor out initialization of scrub_block into helper
authorQu Wenruo <wqu@suse.com>
Mon, 8 Aug 2022 05:45:38 +0000 (13:45 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:27:55 +0000 (12:27 +0200)
commit926c07db48a0e8fb298a697e53c7cca16892f1fc
tree3f2bae8d5d5a10610aede69921ebaa1a1a968185
parent8224d01621ecfd3712b01b22121cbfb65c5dd59e
btrfs: scrub: factor out initialization of scrub_block into helper

Although there are only two callers, we are going to add some members
for scrub_block in the incoming patches.  Factoring out the
initialization code will make later expansion easier.

One thing to note is, even scrub_handle_errored_block() doesn't utilize
scrub_block::refs, we still use alloc_scrub_block() to initialize
sblock::ref, allowing us to use scrub_block_put() to do cleanup.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c