]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: tree-checker: extract the shared key check for free space entries
authorQu Wenruo <wqu@suse.com>
Mon, 11 May 2026 00:56:49 +0000 (10:26 +0930)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:33 +0000 (15:53 +0200)
commit6e4fe45f21ea741f90b5dfeea6b2e763d5642b18
treee45589eda499ea4a27bd3abc3744dbafcf7bf27f
parent4927b141877c35b1af4e32c7876cd2e0a0f16196
btrfs: tree-checker: extract the shared key check for free space entries

Currently both check_free_space_extent() and check_free_space_bitmap()
share a very common validation on the keys.

Extract them into a helper, check_free_space_common_key(), and
change the output string ("extent" or "bitmap") depending on the key type.

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/tree-checker.c