From patchwork Thu Oct 25 21:10:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10656593 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 B5AE514DE for ; Thu, 25 Oct 2018 21:11:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA3492C648 for ; Thu, 25 Oct 2018 21:11:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E4102C650; Thu, 25 Oct 2018 21:11:45 +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 4AEB62C648 for ; Thu, 25 Oct 2018 21:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727613AbeJZFqC (ORCPT ); Fri, 26 Oct 2018 01:46:02 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:33639 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbeJZFqB (ORCPT ); Fri, 26 Oct 2018 01:46:01 -0400 Received: by mail-it1-f196.google.com with SMTP id h6-v6so3043740ith.0 for ; Thu, 25 Oct 2018 14:11:43 -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=ChVwIxyk4YkkXzzaG4Je4u0ejNwdFC4IbBDvWfE+I7Q=; b=gcoEUyAv/v7sxGDZKIJTymKao7b6C25C5xswy5RHRVGxm/mi/yBzPsWzMkiwAuLckX Zh5WxL4J4M9aNCNEPD5CIqnz9VDVzr2/IuA8ZzCOp70eA+s16tnEo9FGZYdhZ6voSKah DbsMdYohAWtKr88Pd4yRiw0SFu5UE1T03f2QyTJRUZrP7D3GOhFzZ5JHgSDCrtOWscuU bvzV8VKgqRdW9EGLlr2jYTl4Fqzj2Me2ijB4ZrvyzZtKnRgsUuGbZs/oN+ucaCGsJsgF TPTSpS+dXH0rcNnLoQRFcHMAdzs3K4sZfar9+2JvorVY/xYOCLX1wPE9qnQ7L8Y1IekH UkAg== 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=ChVwIxyk4YkkXzzaG4Je4u0ejNwdFC4IbBDvWfE+I7Q=; b=fxhGIyOwioChXbx3EdMFV4e6rI/Qu+cxXewE1pcsKD7RbFhFbghJ/v5Z6cLJvM/K+g Vps1GpO58rp4VuLXaYG41OEXJn8Eaku6mbOXKmeeodn/Kv2BeWHHGaSVep/R/P4dVj3L H6f7Tzo5lcwHaJtQqyrLmiiikgoVL89gUyXFHy97OISf8KG4ddIXVkRjeRxR5LXUqb8g l/2mTHaOxs0XVoGvqYhywSFxLT8tRlbmAeS8CdzlVlPtBrdj/dlurZ9/jb62Haz1lxuw wqwtVUvAseL56wZeMeb6nwMPKJr/0o3kdEt2LW8E6NFQmgQVteraPyT+YxPnseGqTqIi 40NA== X-Gm-Message-State: AGRZ1gKD+sJ6LhwJx5lqlw+YVd0a7GxHBifxWAL0e1nQ/m9WiQziYIpH wUXKKrwxi8MsOd4XL6oooTfcz4RTcvoVtw== X-Google-Smtp-Source: AJdET5cYmQGn3W2oixIFPP0XO7wMRbZPvy7ZaDH/5aSd2RmFMXaUdhR5ufA/9SFWvbVjh568s1pewA== X-Received: by 2002:a02:6a16:: with SMTP id l22-v6mr689455jac.9.1540501903287; Thu, 25 Oct 2018 14:11:43 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id e65-v6sm3446375ioa.76.2018.10.25.14.11.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 14:11:42 -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 28/28] block: get rid of blk_queued_rq() Date: Thu, 25 Oct 2018 15:10:39 -0600 Message-Id: <20181025211039.11559-29-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025211039.11559-1-axboe@kernel.dk> References: <20181025211039.11559-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. Signed-off-by: Jens Axboe Reviewed-by: Hannes Reinecke --- 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 95e119409490..82b6cf45c6e0 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -678,8 +678,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)