linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ubi: block: Fix missing blk_mq_end_request
@ 2023-03-11  9:29 Richard Weinberger
  2023-03-11 10:37 ` Daniel Palmer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Weinberger @ 2023-03-11  9:29 UTC (permalink / raw)
  To: linux-mtd
  Cc: linux-kernel, Richard Weinberger, Daniel Palmer, Linus Torvalds,
	Christoph Hellwig

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 <daniel@0x0f.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Fixes: 91cc8fbcc8c7 ("ubi: block: set BLK_MQ_F_BLOCKING")
Analyzed-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Daniel Palmer <daniel@0x0f.com>
Link: https://lore.kernel.org/linux-mtd/CAHk-=wi29bbBNh3RqJKu3PxzpjDN5D5K17gEVtXrb7-6bfrnMQ@mail.gmail.com/
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 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)
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ubi: block: Fix missing blk_mq_end_request
  2023-03-11  9:29 [PATCH] ubi: block: Fix missing blk_mq_end_request Richard Weinberger
@ 2023-03-11 10:37 ` Daniel Palmer
  2023-03-11 12:40 ` Christoph Hellwig
  2023-03-11 17:01 ` Linus Torvalds
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Palmer @ 2023-03-11 10:37 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-mtd, linux-kernel, Linus Torvalds, Christoph Hellwig

Hi Richard,

On Sat, 11 Mar 2023 at 18:29, Richard Weinberger <richard@nod.at> wrote:
>
> Switching to BLK_MQ_F_BLOCKING wrongly removed the call to
> blk_mq_end_request(). Add it back to have our IOs finished

Machine is booting again. Thanks!

Tested-by: Daniel Palmer <daniel@0x0f.com>

Cheers,

Daniel

---

Sorry if this e-mail doesn't get to the mailing lists. gmail is doing
something wonky and sending e-mails with HTML even with plain text
selected.
The original report bounced for a bunch of recipients due to that.
Guess I'm setting up a better mail client at some point..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ubi: block: Fix missing blk_mq_end_request
  2023-03-11  9:29 [PATCH] ubi: block: Fix missing blk_mq_end_request Richard Weinberger
  2023-03-11 10:37 ` Daniel Palmer
@ 2023-03-11 12:40 ` Christoph Hellwig
  2023-03-11 17:01 ` Linus Torvalds
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2023-03-11 12:40 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-mtd, linux-kernel, Daniel Palmer, Linus Torvalds,
	Christoph Hellwig

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ubi: block: Fix missing blk_mq_end_request
  2023-03-11  9:29 [PATCH] ubi: block: Fix missing blk_mq_end_request Richard Weinberger
  2023-03-11 10:37 ` Daniel Palmer
  2023-03-11 12:40 ` Christoph Hellwig
@ 2023-03-11 17:01 ` Linus Torvalds
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2023-03-11 17:01 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-mtd, linux-kernel, Daniel Palmer, Christoph Hellwig

On Sat, Mar 11, 2023 at 1:29 AM Richard Weinberger <richard@nod.at> wrote:
>
> Switching to BLK_MQ_F_BLOCKING wrongly removed the call to
> blk_mq_end_request(). Add it back to have our IOs finished

Applied,

                 Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-11 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11  9:29 [PATCH] ubi: block: Fix missing blk_mq_end_request Richard Weinberger
2023-03-11 10:37 ` Daniel Palmer
2023-03-11 12:40 ` Christoph Hellwig
2023-03-11 17:01 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).