Commit bb49c6fa authored by Stefano Garzarella's avatar Stefano Garzarella Committed by Jens Axboe

block: clear iocb->private in blkdev_bio_end_io_async()

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: 54a88eb8 ("block: add single bio async direct IO helper")
Cc: asml.silence@gmail.com
Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220211090136.44471-1-sgarzare@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e92bc4cd
...@@ -289,6 +289,8 @@ static void blkdev_bio_end_io_async(struct bio *bio) ...@@ -289,6 +289,8 @@ static void blkdev_bio_end_io_async(struct bio *bio)
struct kiocb *iocb = dio->iocb; struct kiocb *iocb = dio->iocb;
ssize_t ret; ssize_t ret;
WRITE_ONCE(iocb->private, NULL);
if (likely(!bio->bi_status)) { if (likely(!bio->bi_status)) {
ret = dio->size; ret = dio->size;
iocb->ki_pos += ret; iocb->ki_pos += ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment