From patchwork Mon May 25 09:38:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 11568477 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C005513B4 for ; Mon, 25 May 2020 09:38:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F8E82073B for ; Mon, 25 May 2020 09:38:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WFEw1xU1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389607AbgEYJiv (ORCPT ); Mon, 25 May 2020 05:38:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56363 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389367AbgEYJiu (ORCPT ); Mon, 25 May 2020 05:38:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590399529; 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=N4rbrEoU/rVmWob08czqBURVqgZ4E3FdNW1uZmy8HQY=; b=WFEw1xU15yJwyomw5WUGp79Rwwv+Db4MgQIXEPX84CS4Oh4NB+IpA9cx7LtxUI3lrPOUeu G8dIMOuKNQUl5/vUxxtrNIft/WnQrGD8h+MVVIMh38diiwDj+kG20GmLBCw45ENJvJt4qO 7E41yKr3EPJ+QqQm6yxlVs/D1p53igs= 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-344-5PQ7ARx3NaK3g1N6S_pdvA-1; Mon, 25 May 2020 05:38:47 -0400 X-MC-Unique: 5PQ7ARx3NaK3g1N6S_pdvA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5745D107ACCD; Mon, 25 May 2020 09:38:46 +0000 (UTC) Received: from localhost (ovpn-12-137.pek2.redhat.com [10.72.12.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE6AC5C1BB; Mon, 25 May 2020 09:38:42 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Ming Lei , Sagi Grimberg , Baolin Wang , Christoph Hellwig Subject: [PATCH V2 4/6] blk-mq: remove dead check from blk_mq_dispatch_rq_list Date: Mon, 25 May 2020 17:38:05 +0800 Message-Id: <20200525093807.805155-5-ming.lei@redhat.com> In-Reply-To: <20200525093807.805155-1-ming.lei@redhat.com> References: <20200525093807.805155-1-ming.lei@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 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 1b257a94b020..a368eeb9d378 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1410,13 +1410,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; }