]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
pipe: check for IOCB_NOWAIT alongside O_NONBLOCK
authorJens Axboe <axboe@kernel.dk>
Tue, 9 May 2023 15:12:24 +0000 (09:12 -0600)
committerChristian Brauner <brauner@kernel.org>
Fri, 12 May 2023 15:17:27 +0000 (17:17 +0200)
commitc04fe8e32f907ea668f3f802387c1148fdb0e6c9
treef59e8af5e48f2b1291b3d537c1bdb6b71e549abf
parentac9a78681b921877518763ba0e89202254349d1b
pipe: check for IOCB_NOWAIT alongside O_NONBLOCK

Pipe reads or writes need to enable nonblocking attempts, if either
O_NONBLOCK is set on the file, or IOCB_NOWAIT is set in the iocb being
passed in. The latter isn't currently true, ensure we check for both
before waiting on data or space.

Fixes: afed6271f5b0 ("pipe: set FMODE_NOWAIT on pipes")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Message-Id: <e5946d67-4e5e-b056-ba80-656bab12d9f6@kernel.dk>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/pipe.c