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 Reviewed-by: Hannes Reinecke Signed-off-by: Tal Zussman --- block/fops.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/block/fops.c b/block/fops.c index 59af4e808204..b13e8f83ff82 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