mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
direct-io: remove IOCB_NOWAIT support
None of the file systems using the legacy direct I/O code actually sets FMODE_NOWAIT, and if they did this would not work, as the write locking could not handle the retry. Remove this dead code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://patch.msgid.link/20260518063336.507369-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
f73aa66dff
commit
38273e7b15
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user