[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220228172406.691243934@linuxfoundation.org>
Date: Mon, 28 Feb 2022 18:23:55 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, asml.silence@...il.com,
Stefano Garzarella <sgarzare@...hat.com>,
Ming Lei <ming.lei@...hat.com>, Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 5.16 073/164] block: clear iocb->private in blkdev_bio_end_io_async()
From: Stefano Garzarella <sgarzare@...hat.com>
commit bb49c6fa8b845591b317b0d7afea4ae60ec7f3aa upstream.
iocb_bio_iopoll() expects iocb->private to be cleared before
releasing the bio.
We already do this in blkdev_bio_end_io(), but we forgot in the
recently added blkdev_bio_end_io_async().
Fixes: 54a88eb838d3 ("block: add single bio async direct IO helper")
Cc: asml.silence@...il.com
Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
Reviewed-by: Ming Lei <ming.lei@...hat.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Link: https://lore.kernel.org/r/20220211090136.44471-1-sgarzare@redhat.com
Signed-off-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
block/fops.c | 2 ++
1 file changed, 2 insertions(+)
--- a/block/fops.c
+++ b/block/fops.c
@@ -289,6 +289,8 @@ static void blkdev_bio_end_io_async(stru
struct kiocb *iocb = dio->iocb;
ssize_t ret;
+ WRITE_ONCE(iocb->private, NULL);
+
if (likely(!bio->bi_status)) {
ret = dio->size;
iocb->ki_pos += ret;
Powered by blists - more mailing lists