]> 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)
commitc37afefbad1dd334ecab35f2a5ed94e36f49a4a4
tree6c2f9794f04928504ba7cb032cf54e03b84210f2
parent0e00adba49c9b0de9384f68f9df857443773dd20
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