Skip to content
Snippets Groups Projects
Commit f1591a8b authored by Kemeng Shi's avatar Kemeng Shi Committed by Jens Axboe
Browse files

sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow


Updates to alloc_hint in the loop in __sbitmap_get_shallow() are mostly
pointless and equivalent to setting alloc_hint to zero (because
SB_NR_TO_BIT() considers only low sb->shift bits from alloc_hint). So
simplify the logic.

Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Link: https://lore.kernel.org/r/20230116205059.3821738-2-shikemeng@huaweicloud.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f1c006f1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment