]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: block-group: Reuse the item key from caller of read_one_block_group()
authorQu Wenruo <wqu@suse.com>
Tue, 5 Nov 2019 01:35:35 +0000 (09:35 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 16:51:50 +0000 (17:51 +0100)
commita9b27ee4bd7c2e57308e6e5643c2b94aa53efa4d
tree6f86031fd5bc66c684ebf0ea5b3447fb0c52c1c1
parent1ad0cf313f346421447b07d502800851a0633bfd
btrfs: block-group: Reuse the item key from caller of read_one_block_group()

For read_one_block_group(), its only caller has already got the item key
to search next block group item.

So we can use that key directly without doing our own convertion on
stack.

Also, since that key used in btrfs_read_block_groups() is vital for
block group item search, add 'const' keyword for that parameter to
prevent read_one_block_group() to modify it.

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/block-group.c