block: switch to atomic_t for request references
authorJens Axboe <axboe@kernel.dk>
Thu, 14 Oct 2021 20:39:59 +0000 (14:39 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 3 Dec 2021 21:51:29 +0000 (14:51 -0700)
commit0a467d0fdd9594fbb449ebc93852533332c528fd
treefd368b2ce4f835da5d78e1bbd381b38aa98fd078
parentceaa762527f41a431b552bc000de4b626d2d8cb7
block: switch to atomic_t for request references

refcount_t is not as expensive as it used to be, but it's still more
expensive than the io_uring method of using atomic_t and just checking
for potential over/underflow.

This borrows that same implementation, which in turn is based on the
mm implementation from Linus.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-flush.c
block/blk-mq-tag.c
block/blk-mq.c
block/blk.h
include/linux/blk-mq.h