]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ilog2: add max_pow_of_two_factor()
authorJohn Garry <john.g.garry@oracle.com>
Fri, 11 Jul 2025 10:52:53 +0000 (10:52 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Jul 2025 12:01:16 +0000 (06:01 -0600)
commit6381061d82141909c382811978ccdd7566698bca
treee4b11307fdd1b8cee0878c16268862996f8e00bf
parentab17ead0e0ee8650cd1cf4e481b1ed0ee9731956
ilog2: add max_pow_of_two_factor()

Relocate the function max_pow_of_two_factor() to common ilog2.h from the
xfs code, as it will be used elsewhere.

Also simplify the function, as advised by Mikulas Patocka.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20250711105258.3135198-2-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/xfs/xfs_mount.c
include/linux/log2.h