[PATCH v4 8/8] block: remove dead metadata handling from the async direct I/O path
From: Tal Zussman
Date: Mon Sep 21 2026 - 22:56:18 EST
Since commit 2729a60bbfb9 ("block: don't silently ignore metadata for
sync read/write"), blkdev_direct_IO() sends every IOCB_HAS_METADATA
request to __blkdev_direct_IO(). Remove the now unreachable metadata
mapping in __blkdev_direct_IO_async() and the unmap in its completion
handler.
No functional change.
Assisted-by: Claude:claude-fable-5
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Hannes Reinecke <hare@xxxxxxxxxx>
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
block/fops.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/block/fops.c b/block/fops.c
index 7f23778f6b81..55c2e606c662 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -306,9 +306,6 @@ static void blkdev_bio_end_io_async(struct bio *bio)
ret = blk_status_to_errno(bio->bi_status);
}
- if (bio_integrity(bio))
- bio_integrity_unmap_user(bio);
-
iocb->ki_complete(iocb, ret);
if (dio->flags & DIO_SHOULD_DIRTY) {
@@ -370,13 +367,6 @@ static ssize_t __blkdev_direct_IO_async(struct kiocb *iocb,
task_io_account_write(bio->bi_iter.bi_size);
}
- if (iocb->ki_flags & IOCB_HAS_METADATA) {
- ret = bio_integrity_map_iter(bio, iocb->private);
- WRITE_ONCE(iocb->private, NULL);
- if (unlikely(ret))
- goto out_bio_put;
- }
-
if (iocb->ki_flags & IOCB_HIPRI) {
bio->bi_opf |= REQ_POLLED;
submit_bio(bio);
--
2.39.5