sbitmap: fix sbitmap_for_each_set()
authorOmar Sandoval <osandov@fb.com>
Mon, 3 Dec 2018 22:45:43 +0000 (14:45 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Dec 2018 00:03:58 +0000 (17:03 -0700)
commit8c2def893afc60d88160d524acf345765cf0c447
tree1591bf8e79e27bc533c1781923b154f9545ce2f0
parentfe1f452640d888c4311ef35c8ee497f47c3ea17c
sbitmap: fix sbitmap_for_each_set()

We need to ignore bits in the cleared mask when iterating over all set
bits.

Fixes: ea86ea2cdced ("sbitmap: ammortize cost of clearing bits")
Reported-by: Jens Axboe@kernel.dk>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/sbitmap.h