From patchwork Mon Oct 29 16:34:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10659675 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 0427D1751 for ; Mon, 29 Oct 2018 16:35:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBF8D29C43 for ; Mon, 29 Oct 2018 16:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D090E29C4A; Mon, 29 Oct 2018 16:35:49 +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=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 6F84A29C43 for ; Mon, 29 Oct 2018 16:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbeJ3BZJ (ORCPT ); Mon, 29 Oct 2018 21:25:09 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:37887 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728099AbeJ3BZI (ORCPT ); Mon, 29 Oct 2018 21:25:08 -0400 Received: by mail-it1-f193.google.com with SMTP id e74-v6so10173293ita.2 for ; Mon, 29 Oct 2018 09:35:47 -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=zoUhcsbigKFVrdRVRk1w09KI4q15Bjx3FilUe1hs2WB4qmtqmSiKEPxZCZb0dMtGzY posN8+qIxbVCHb4JAiLUfAmmJDr91RWl7cb31JG2tsh0dDSi967xtrGsqypY1FU+mxcZ q6DeSSB8MFxMNWfsPMdQOfE37wuZ/6T6YmzZZANt/IBtBVDBuNytOdDeKBeUpp4LnCJb xsO9tPE0OdRAhxgfeTeGzYG/5CGZhZVXJ/r9Ua3//gp97f6pUSPNCch2Kc22dHYnCA82 2uXdaTq2bmkjO9ZbnRrWAIRNQzj5G4txKtrE3OTKVzRAvzV/ZsOZ5q1pK6Z+UevMZj6C x5Dg== 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=KRozib674p3+NKsKEjDv3a8I1lmUZXChLhiKIX2hZOwiJxukgYuH+yCP5/j9q/77Mj Fc0yH1ug8p2C+3/Q5v4MMzENEcjb3iWbwTEQXnkoKcsQEObF//p/Cw7nVWambsahY/1e iH2j6Xxe/rhcpu6w61SjcupYZdhtfe3/27wLWXoispqW6+tC68lJl2zp7PomOksKMa90 QFAdqc6buVWT+arK7EoIwBBMockgQJ/mUHQm7cll4ckigwzofOoJ1vZetU4WcqLnC/x4 1VjgjTzo0J6yz3TPvZv4mtfnRgx1uuaOa+ViAOTlFUL560BG8PYwG0cs+4DgEZAEn53Y c9VQ== X-Gm-Message-State: AGRZ1gLffOzHAXreqUJRtP4RWms3gzJQ2tsHCJut0P9tXhhruqIs2wfB 9zS3o6gYaQf1Prj8ZqE4Pc0YcA== X-Google-Smtp-Source: AJdET5dlUp33q3827DqU2Ui2obVd3rNbrmJ269+N+VMv6Hoh333Z+rYEBe4VpI/rPQgCPyctsk9OvA== X-Received: by 2002:a24:c343:: with SMTP id s64-v6mr1934959itg.20.1540830947076; Mon, 29 Oct 2018 09:35:47 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id n7-v6sm6464500itb.22.2018.10.29.09.35.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 09:35:45 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 29/29] block: get rid of blk_queued_rq() Date: Mon, 29 Oct 2018 10:34:44 -0600 Message-Id: <20181029163444.9940-30-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029163444.9940-1-axboe@kernel.dk> References: <20181029163444.9940-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)