sbitmap: flush deferred clears for resize and shallow gets
authorJens Axboe <axboe@kernel.dk>
Wed, 12 Dec 2018 01:39:41 +0000 (18:39 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 12 Dec 2018 01:39:41 +0000 (18:39 -0700)
commitb2dbff1bb893d5dfdf501231ff5505ca10cdede3
tree52f74b5b06c2ba8fbfb6f3cd12e479c869572afa
parent2c4d5356e64d7d538f24c23045478330fae4a065
sbitmap: flush deferred clears for resize and shallow gets

We're missing a deferred clear off the shallow get, which can cause
a hang. Additionally, when we resize the sbitmap, we should also
flush deferred clears for good measure.

Ensure we have full coverage on batch clears, even for paths where
we would not be doing deferred clear. This makes it less error
prone for future additions.

Reported-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/sbitmap.c