]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: raid56: open code rbio_nr_pages()
authorQu Wenruo <wqu@suse.com>
Fri, 1 Apr 2022 11:23:16 +0000 (19:23 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:14 +0000 (17:03 +0200)
commit472c6c514e55753e177290679a16a8774db78bbd
tree6c2f9794f04928504ba7cb032cf54e03b84210f2
parentefffd55c470cc4c8bfd961d4ec32c09454dadb4f
btrfs: raid56: open code rbio_nr_pages()

The function rbio_nr_pages() is only called once inside alloc_rbio(),
there is no reason to make it dedicated helper.

Furthermore, the return type doesn't match, the function return "unsigned
long" which may not be necessary, while the only caller only uses "int".

Since we're doing cleaning up here, also fix the type to "const unsigned
int" for all involved local variables.

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/raid56.c