aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Garzarella <[email protected]>2022-02-11 10:01:36 +0100
committerJens Axboe <[email protected]>2022-02-22 06:59:49 -0700
commitbb49c6fa8b845591b317b0d7afea4ae60ec7f3aa (patch)
tree000086c1b01dbb4dbd9edf1d47353eb7dc50ea50
parente92bc4cd34de2ce454bdea8cd198b8067ee4e123 (diff)
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: 54a88eb838d3 ("block: add single bio async direct IO helper") Cc: [email protected] Signed-off-by: Stefano Garzarella <[email protected]> Reviewed-by: Ming Lei <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--block/fops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/fops.c b/block/fops.c
index 4f59e0f5bf30..a18e7fbd97b8 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;