diff options
| author | Jens Axboe <axboe@kernel.dk> | 2026-05-26 11:02:17 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-05-26 11:02:17 -0600 |
| commit | f1cad4de61239d9a0d43652de6eefe79679444ca (patch) | |
| tree | 15802ee5f7afa772c193ada027e5110052dce1e6 /fs | |
| parent | a8920e95adb1fde467a47b45335362996758db55 (diff) | |
| parent | ee9895ae5a1868b13effc28174e4bb7f1084ded6 (diff) | |
| download | linux-next-history-f1cad4de61239d9a0d43652de6eefe79679444ca.tar.gz | |
Merge branch 'for-7.2/block' into for-next
* for-7.2/block:
block: remove blkdev_write_begin() and blkdev_write_end()
mtip32xx: fix use-after-free on service thread failure
block: don't set BIO_QUIET for BLK_STS_AGAIN
direct-io: remove IOCB_NOWAIT support
block: Avoid mounting the bdev pseudo-filesystem in userspace
block: switch numa_node to int in blk_mq_hw_ctx and init_request
block: skip sync_blockdev() on surprise removal in bdev_mark_dead()
blk-mq: add tracepoint block_rq_tag_wait
block: partitions: fix of_node refcount leak in of_partition()
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/direct-io.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 2267f5ae7f77a..9e49767169855 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -502,12 +502,8 @@ static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio) const enum req_op dio_op = dio->opf & REQ_OP_MASK; bool should_dirty = dio_op == REQ_OP_READ && dio->should_dirty; - if (err) { - if (err == BLK_STS_AGAIN && (bio->bi_opf & REQ_NOWAIT)) - dio->io_error = -EAGAIN; - else - dio->io_error = -EIO; - } + if (err) + dio->io_error = -EIO; if (dio->is_async && should_dirty) { bio_check_pages_dirty(bio); /* transfers ownership */ @@ -1178,13 +1174,10 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, dio->is_async = true; dio->inode = inode; - if (iov_iter_rw(iter) == WRITE) { + if (iov_iter_rw(iter) == WRITE) dio->opf = REQ_OP_WRITE | REQ_SYNC | REQ_IDLE; - if (iocb->ki_flags & IOCB_NOWAIT) - dio->opf |= REQ_NOWAIT; - } else { + else dio->opf = REQ_OP_READ; - } /* * For AIO O_(D)SYNC writes we need to defer completions to a workqueue |
