Skip to content
Snippets Groups Projects
Commit c0a9d496 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/rw: treat -EOPNOTSUPP for IOCB_NOWAIT like -EAGAIN


Some file systems, ocfs2 in this case, will return -EOPNOTSUPP for
an IOCB_NOWAIT read/write attempt. While this can be argued to be
correct, the usual return value for something that requires blocking
issue is -EAGAIN.

A refactoring io_uring commit dropped calling kiocb_done() for
negative return values, which is otherwise where we already do that
transformation. To ensure we catch it in both spots, check it in
__io_read() itself as well.

Reported-by: default avatarRobert Sander <r.sander@heinlein-support.de>
Link: https://fosstodon.org/@gurubert@mastodon.gurubert.de/113112431889638440


Cc: stable@vger.kernel.org
Fixes: a08d195b ("io_uring/rw: split io_read() into a helper")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f011c9cf
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment