Skip to content

Commit bb49c6f

Browse files
stefano-garzarellaaxboe
authored andcommitted
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: 54a88eb ("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]>
1 parent e92bc4c commit bb49c6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

block/fops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ static void blkdev_bio_end_io_async(struct bio *bio)
289289
struct kiocb *iocb = dio->iocb;
290290
ssize_t ret;
291291

292+
WRITE_ONCE(iocb->private, NULL);
293+
292294
if (likely(!bio->bi_status)) {
293295
ret = dio->size;
294296
iocb->ki_pos += ret;

0 commit comments

Comments
 (0)