From patchwork Wed Oct 31 17:59:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10663141 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 3DE8A3CF1 for ; Wed, 31 Oct 2018 18:00:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 319132B51F for ; Wed, 31 Oct 2018 18:00:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 263E62B4E4; Wed, 31 Oct 2018 18:00: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,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 B83B42B517 for ; Wed, 31 Oct 2018 18:00:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730233AbeKAC7a (ORCPT ); Wed, 31 Oct 2018 22:59:30 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:39103 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730213AbeKAC72 (ORCPT ); Wed, 31 Oct 2018 22:59:28 -0400 Received: by mail-it1-f194.google.com with SMTP id m15so19550532itl.4 for ; Wed, 31 Oct 2018 11:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lB0IApltH8SwHx+ccsD8183EEWVI9TY1qpbTC0kycJM=; b=YuCZM6up6pEJkqbtX6DwdZSHyFaoR15UznPoZ5MRCE10Y92Nb9ic+ez5ES+qP/mWgC 767CRyLn9mwvvsaM9gf8UxpjvCqO2LWGhEk2AWgCPEQ3MqgSF5ykFY01zcxOmApSg0tr 1lHJXZmSo6DxvCCTEcyFi/QrjZXmHMYn8crqr4O94cjusJDOCORgDvQ6yP5J4wub1DrM tAtrg0vhrhcAQAqoudqJk4A4M5IuntBxJK3jlEgFKeRvhSiCK0Yq0fJDkX3QoPl94k56 LaLpLAFP9C1TMfmK4q/WHQbBrGOU9UOD6Rp3BzX7qp4uX1VD/jSe6xwTi2Z5NN+XabP7 4CIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lB0IApltH8SwHx+ccsD8183EEWVI9TY1qpbTC0kycJM=; b=Tf9em6Vyx2IUSa+UU28KZFWK3Bj2UmyDxMatFERTG7mIoW7U4W6zHon4RfEwowoSJm GWRV7uIK6mAVQwPNPq4ouMRYIKOz5qMRl4gWWlj5SX8065HeDqOylWY1vBifdi2mlgOT ptHKCU0Bjz6coea2AhQTVuI2ULTNQEQGWG7gsTKlTyMzQYtWFfR+jxsBBbB67f3C5jyS QPmQoHTzI+NQDiUxNdr6htJ04zvyp/uce46HVgJpxPhac67+KEIfIhAJBbTB/MkAFBzS 02/3L1dJIwHpLle6TrJsJeLSITX+ge+JaNVhV5JplhJqv6sx2W6pHdObZ2Ydr38+uAz6 utrg== X-Gm-Message-State: AGRZ1gJfTmIdQAOCY+FTrOubl7giK0m+y5nlzci6CkLUlWx3Wvw6oVJ0 Y3KHWSyqLja923k+KLplf/emVQafdZE= X-Google-Smtp-Source: AJdET5fGBzoXb3tD60mNrO3j7r6j8DANknuoETL5L49x0h7kX+YHUPRRyKZjjGlwFu6y7JYinjv8Vg== X-Received: by 2002:a24:edc3:: with SMTP id r186-v6mr2772713ith.100.1541008824136; Wed, 31 Oct 2018 11:00:24 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 197-v6sm10982947iou.87.2018.10.31.11.00.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 11:00:22 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 29/30] block: get rid of blk_queued_rq() Date: Wed, 31 Oct 2018 11:59:21 -0600 Message-Id: <20181031175922.8849-30-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031175922.8849-1-axboe@kernel.dk> References: <20181031175922.8849-1-axboe@kernel.dk> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No point in hiding what this does, just open code it in the one spot where we are still using it. Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe --- block/blk-mq.c | 2 +- include/linux/blkdev.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index d43c9232c77c..21e4147c4810 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -692,7 +692,7 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list) /* this request will be re-inserted to io scheduler queue */ blk_mq_sched_requeue_request(rq); - BUG_ON(blk_queued_rq(rq)); + BUG_ON(!list_empty(&rq->queuelist)); blk_mq_add_to_requeue_list(rq, true, kick_requeue_list); } EXPORT_SYMBOL(blk_mq_requeue_request); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e0c661a95c39..c675e2b5af62 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -673,8 +673,6 @@ static inline bool blk_account_rq(struct request *rq) #define blk_rq_cpu_valid(rq) ((rq)->cpu != -1) #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) -/* rq->queuelist of dequeued request must be list_empty() */ -#define blk_queued_rq(rq) (!list_empty(&(rq)->queuelist)) #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)