ubi: block: Fix missing blk_mq_end_request

Message ID 20230311092929.2827-1-richard@nod.at
State New
Headers
Series ubi: block: Fix missing blk_mq_end_request |

Commit Message

Richard Weinberger March 11, 2023, 9:29 a.m. UTC
  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(-)
  

Comments

Daniel Palmer March 11, 2023, 10:37 a.m. UTC | #1
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..
  
Christoph Hellwig March 11, 2023, 12:40 p.m. UTC | #2
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
  
Linus Torvalds March 11, 2023, 5:01 p.m. UTC | #3
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
  

Patch

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)