From patchwork Fri Mar 22 14:48:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yufen Yu X-Patchwork-Id: 10865959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5622315AC for ; Fri, 22 Mar 2019 14:44:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DF72292DD for ; Fri, 22 Mar 2019 14:44:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32628291FA; Fri, 22 Mar 2019 14:44:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4CDB292DD for ; Fri, 22 Mar 2019 14:44:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729377AbfCVOoI (ORCPT ); Fri, 22 Mar 2019 10:44:08 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5735 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729413AbfCVOoI (ORCPT ); Fri, 22 Mar 2019 10:44:08 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6145FF1B4CC5320D2DEB; Fri, 22 Mar 2019 22:44:06 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Fri, 22 Mar 2019 22:44:01 +0800 From: Yufen Yu To: , , CC: Subject: [PATCH 0/2] blk-mq: convert atomic_t to refcount_t Date: Fri, 22 Mar 2019 22:48:16 +0800 Message-ID: <20190322144818.987-1-yuyufen@huawei.com> X-Mailer: git-send-email 2.16.2.dirty MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)