summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2022-02-11 10:01:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-02 11:51:03 +0100
commit7c5612ab5ccf42cd7e194b504c692f450c14f6c6 (patch)
treede281a128596fecfa257966f5caa13029b40ced4 /block
parentaf01394bd450dec3a0c2d913d0b8c3afae54a8d2 (diff)
block: clear iocb->private in blkdev_bio_end_io_async()
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@gmail.com Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220211090136.44471-1-sgarzare@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/fops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/fops.c b/block/fops.c
index 0da147edbd18..77a5579d8de6 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -289,6 +289,8 @@ static void blkdev_bio_end_io_async(struct bio *bio)
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;