From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3100EC433DF for ; Wed, 3 Jun 2020 09:44:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A485207D3 for ; Wed, 3 Jun 2020 09:44:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AlsFik0Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726011AbgFCJoQ (ORCPT ); Wed, 3 Jun 2020 05:44:16 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:48680 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725854AbgFCJoQ (ORCPT ); Wed, 3 Jun 2020 05:44:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591177455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bf23DuMnk7wRuNLmeborXHf0+1BPs3zQ7RGdG9eLWNY=; b=AlsFik0Y4rxrv8W0TPn1M1Y0n9qO/3YVRIxvvpNf0JkLi3sKqirK40F1PkVZdP3LyKfnDD tTy0cKvxCI1BbW1jxr+7BLr6F3fOYUPbar/Pa6nBo6V1il/AWOfdv8h5DGb1ltuLIIgWyj F1w6ZHt9Lnousio/halRBc5O/iBBSCI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-2RFboRL9NWiiYDJ5UF8A0g-1; Wed, 03 Jun 2020 05:44:11 -0400 X-MC-Unique: 2RFboRL9NWiiYDJ5UF8A0g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E29691005510; Wed, 3 Jun 2020 09:44:09 +0000 (UTC) Received: from localhost (ovpn-12-230.pek2.redhat.com [10.72.12.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10C582DE75; Wed, 3 Jun 2020 09:44:08 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Damien Le Moal , Ming Lei , Sagi Grimberg , Baolin Wang , Christoph Hellwig Subject: [PATCH V5 4/6] blk-mq: remove dead check from blk_mq_dispatch_rq_list Date: Wed, 3 Jun 2020 17:43:35 +0800 Message-Id: <20200603094337.2064181-5-ming.lei@redhat.com> In-Reply-To: <20200603094337.2064181-1-ming.lei@redhat.com> References: <20200603094337.2064181-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org When BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE is returned from .queue_rq, the 'list' variable always holds this rq which isn't queued to LLD successfully. So blk_mq_dispatch_rq_list() always returns false from the branch of '!list_empty(list)'. No functional change. Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Tested-by: Baolin Wang Signed-off-by: Ming Lei --- block/blk-mq.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index fbfdb455e613..4085dc59bea6 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1404,13 +1404,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list, } else blk_mq_update_dispatch_busy(hctx, false); - /* - * If the host/device is unable to accept more work, inform the - * caller of that. - */ - if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE) - return false; - return (queued + errors) != 0; } -- 2.25.2