]> git.baikalelectronics.ru Git - kernel.git/commit
dm-crypt: fix warning in shutdown path
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 2 Jun 2018 17:45:04 +0000 (13:45 -0400)
committerJens Axboe <axboe@kernel.dk>
Sun, 3 Jun 2018 02:35:00 +0000 (20:35 -0600)
commit8eb842ea8857990613a425e700fb5f806f69166e
treedbb0648d1885936d8490f910612ccc4c9186ca88
parent6e42ddbbd218d5a23a9ffc90c039401123d29b8a
dm-crypt: fix warning in shutdown path

The counter for the number of allocated pages includes pages in the
mempool's reserve, so checking that the number of allocated pages is 0
needs to happen after we exit the mempool.

Fixes: cb59d3dc59f5 ("dm: convert to bioset_init()/mempool_init()")
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Fixed to always just use percpu_counter_sum()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-crypt.c