]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: export bitmap_test_range_all_{set,zero}
authorNaohiro Aota <naota@elisp.net>
Tue, 25 Apr 2023 15:19:40 +0000 (00:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:22 +0000 (13:59 +0200)
commitb5345d6ceeee3ef378e4800f538c8fc06bf9de48
treeb18d51ae01d19560f45c6e7cfc4c884ea46cc65d
parent88ad95b055764e4c74fb6b8201f794f4e531753d
btrfs: export bitmap_test_range_all_{set,zero}

bitmap_test_range_all_{set,zero} defined in subpage.c are useful for other
components. Move them to misc.h and use them in zoned.c. Also, as
find_next{,_zero}_bit take/return "unsigned long" instead of "unsigned
int", convert the type to "unsigned long".

While at it, also rewrite the "if (...) return true; else return false;"
pattern and add const to the input bitmap.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/misc.h
fs/btrfs/subpage.c
fs/btrfs/zoned.c