From patchwork Sat Mar 11 09:29:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 68030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp199903wrd; Sat, 11 Mar 2023 01:34:20 -0800 (PST) X-Google-Smtp-Source: AK7set+qqCGgogmWtLgd1uOf1zL2fgLvFSoGR8jjtCtTCBb9R8TRSd1lBcNs2R6+uySC6N7n0+hW X-Received: by 2002:a05:6a21:338a:b0:cc:b73a:6f63 with SMTP id yy10-20020a056a21338a00b000ccb73a6f63mr31007673pzb.4.1678527260639; Sat, 11 Mar 2023 01:34:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678527260; cv=none; d=google.com; s=arc-20160816; b=rIxpvD2mc8ytNIM2NZGoVh3SgZT+/B4jYrlzZNvTMAiMeGwgnPE6PHFzp5gfr9hucO OPnkF53TZKHSM3Z/vIWvDECHheud/BJnwikQHW0zlTuiNl9Hfr8nci+o0jffVrpisnxk 3VkOoHMP7FptaTuvRjr56a8DmwGS3QBFJsmuC+FRORacr6bB6cAtZuVOQQxvv2YxDzsp CF8sN02tmCf8Qw9K5cJBT9jnIbTOqyuUUVSQcFU5E2STAJ5CBXSGFoy0O26dd3Fae4ob PYNQ/OilHvTyVmEhcnAp6GydIlqv1euBYYa+Gn7P+6XQRYi+flcemia/7z3AhFEZsDlW IMxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Quj2V2/dqhYtGFPNthxgLpVW/fQWlnhBEZT7PDXAN2I=; b=mTubq36LSxGj1P9WdpBWFmtoJlT4/+inLven1Ao0BPBmQDLsIC6kaXahyROThwa061 hW5b9KDATSQYdJXnUORF1QsUg2DMNmEHUGh9CXHeA7K/nhqt4l5MQjDnQL5e8NJ32+g1 JBKJhA0AaUwzzJWob1W2Ug6DKKgiOQ5PqZsS1lccKdtaOyrBwzV7pP5R9xaJCCWaPgxv +95ocGSSKcamKg0fNbLXF4L/ciFQRy1vemboYKyPRqZ7BukdnNHS8lbiMxqPvuPb3I4P 1l1GUAqHwtJ2+s3HObxF965PzZ1GUFdj6JOXl/BdLcwAc0wZ7wMAmZD7aaKLGOMdWSkr wa6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a63e24b000000b004fbbf1a505csi1823072pgj.113.2023.03.11.01.34.07; Sat, 11 Mar 2023 01:34:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229649AbjCKJaC (ORCPT + 99 others); Sat, 11 Mar 2023 04:30:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbjCKJ3z (ORCPT ); Sat, 11 Mar 2023 04:29:55 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D066227B6 for ; Sat, 11 Mar 2023 01:29:53 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id E617961989E6; Sat, 11 Mar 2023 10:29:50 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 3g_el_QkYBeq; Sat, 11 Mar 2023 10:29:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id CA1EA61989EA; Sat, 11 Mar 2023 10:29:49 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0uJFQxCAaqwE; Sat, 11 Mar 2023 10:29:49 +0100 (CET) Received: from blindfold.corp.sigma-star.at (089144204221.atnat0013.highway.webapn.at [89.144.204.221]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 03ECF61989E6; Sat, 11 Mar 2023 10:29:48 +0100 (CET) From: Richard Weinberger To: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Richard Weinberger , Daniel Palmer , Linus Torvalds , Christoph Hellwig Subject: [PATCH] ubi: block: Fix missing blk_mq_end_request Date: Sat, 11 Mar 2023 10:29:29 +0100 Message-Id: <20230311092929.2827-1-richard@nod.at> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760063400586549095?= X-GMAIL-MSGID: =?utf-8?q?1760063400586549095?= Switching to BLK_MQ_F_BLOCKING wrongly removed the call to blk_mq_end_request(). Add it back to have our IOs finished Cc: Daniel Palmer Cc: Linus Torvalds Cc: Christoph Hellwig Fixes: 91cc8fbcc8c7 ("ubi: block: set BLK_MQ_F_BLOCKING") Analyzed-by: Linus Torvalds Reported-by: Daniel Palmer Link: https://lore.kernel.org/linux-mtd/CAHk-=wi29bbBNh3RqJKu3PxzpjDN5D5K17gEVtXrb7-6bfrnMQ@mail.gmail.com/ Signed-off-by: Richard Weinberger Tested-by: Daniel Palmer Reviewed-by: Christoph Hellwig --- drivers/mtd/ubi/block.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 1de87062c67b..3711d7f74600 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -221,7 +221,10 @@ static blk_status_t ubiblock_read(struct request *req) rq_for_each_segment(bvec, req, iter) flush_dcache_page(bvec.bv_page); - return errno_to_blk_status(ret); + + blk_mq_end_request(req, errno_to_blk_status(ret)); + + return BLK_STS_OK; } static int ubiblock_open(struct block_device *bdev, fmode_t mode)