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 C33D5168AD for ; Mon, 8 May 2023 10:06:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49A44C4339B; Mon, 8 May 2023 10:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683540379; bh=MHKFsfiJ9Lrz5/Zx0Bgm24w5+itETN8I+hw8LrwLMzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m+LGUOwEZ1/EiCHp6/WspLcZqwD77xAJhjX2UJ5SQGxSieplfM/nGDb+rl/dR7zbW j13oDmCW8KuQC8O2u6qYs4Y+GPaayqZsG2xFmRyb6rtI4vzNBU/vYR+kwGFc6rEtU+ YxRpybqOxYs7dEuS2PFESht6ta9xHVBOc7I2zsUE= 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.1 341/611] blk-mq: dont plug for head insertions in blk_execute_rq_nowait Date: Mon, 8 May 2023 11:43:03 +0200 Message-Id: <20230508094433.495537956@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230508094421.513073170@linuxfoundation.org> References: <20230508094421.513073170@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 b3ebf604b1dd5..1ab41fbca0946 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1313,7 +1313,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