mbox series

[0/2] blk-mq: convert atomic_t to refcount_t

Message ID 20190322144818.987-1-yuyufen@huawei.com (mailing list archive)
Headers show
Series blk-mq: convert atomic_t to refcount_t | expand

Message

Yufen Yu March 22, 2019, 2:48 p.m. UTC
Hi,

This patchset covert atomic variables (hctx.nr_active and blk_mq_tag.active_queues)
to newly provided refcount_t type and API, which can prevent accidental counter overflows
and underflows.


Yufen Yu (2):
  blk-mq: convert hctx.nr_active to refcount_t
  blk-mq: covert blk_mq_tag.active_queues to refcount_t

 block/blk-mq-debugfs.c | 4 ++--
 block/blk-mq-tag.c     | 8 ++++----
 block/blk-mq-tag.h     | 2 +-
 block/blk-mq.c         | 8 ++++----
 block/blk-mq.h         | 2 +-
 include/linux/blk-mq.h | 2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

Comments

Jens Axboe March 22, 2019, 3:23 p.m. UTC | #1
On 3/22/19 8:48 AM, Yufen Yu wrote:
> Hi,
> 
> This patchset covert atomic variables (hctx.nr_active and blk_mq_tag.active_queues)
> to newly provided refcount_t type and API, which can prevent accidental counter overflows
> and underflows.

Neither of these are reference counts in the sense that things go away when they
hit zero.