From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 251E0168A7 for ; Mon, 8 May 2023 10:36:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E6E0C433EF; Mon, 8 May 2023 10:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683542215; bh=foCCdI1m8dsBwMNCg1ce7C3ipM0XK3r297lEKuwtJsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ekCmxKVR6BqkMlf2HuItTuhTPtvLAF8foG407rLFXLK33llEBEPS/TQPr6t4M5hbC 7iLooE6ots+Sd40nNVX2dkMAag5YH0QLLZJStT/G/S+xOL8pQioFFg4F77GjRXraiO Of4sLRzeKyUDiCwpLuuSGWsHCbZHz3Vk1yuKZJkI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christoph Hellwig , Bart Van Assche , Damien Le Moal , Jens Axboe , Sasha Levin Subject: [PATCH 6.2 364/663] blk-mq: dont plug for head insertions in blk_execute_rq_nowait Date: Mon, 8 May 2023 11:43:10 +0200 Message-Id: <20230508094439.958727800@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230508094428.384831245@linuxfoundation.org> References: <20230508094428.384831245@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Christoph Hellwig [ Upstream commit 50947d7fe9fa6abe3ddc40769dfb02a51c58edb6 ] Plugs never insert at head, so don't plug for head insertions. Fixes: 1c2d2fff6dc0 ("block: wire-up support for passthrough plugging") Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 22d739cf8d326..9f1bafb62973d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1345,7 +1345,7 @@ void blk_execute_rq_nowait(struct request *rq, bool at_head) * device, directly accessing the plug instead of using blk_mq_plug() * should not have any consequences. */ - if (current->plug) + if (current->plug && !at_head) blk_add_rq_to_plug(current->plug, rq); else blk_mq_sched_insert_request(rq, at_head, true, false); -- 2.39.2