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)
commit843de58b3e317fc51d4a1643f3641401ecf1d941
tree6c2f9794f04928504ba7cb032cf54e03b84210f2
parentcc353a8be2fd3e585c09f0eba23fa3ca1905f253
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