splice: clear FMODE_NOWAIT on file if splice/vmsplice is used
authorJens Axboe <axboe@kernel.dk>
Mon, 24 Apr 2023 22:32:55 +0000 (16:32 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Apr 2023 20:08:55 +0000 (14:08 -0600)
commit0f99fc513ddd28de155c58547824a9fd63daacea
tree402b7ee95f3e94fc5d0e3b7d191b10e68899cd15
parent457391b0380335d5e9a5babdec90ac53928b23b4
splice: clear FMODE_NOWAIT on file if splice/vmsplice is used

In preparation for pipes setting FMODE_NOWAIT on pipes to indicate that
RWF_NOWAIT/IOCB_NOWAIT is fully supported, have splice and vmsplice
clear that file flag. Splice holds the pipe lock around IO and cannot
easily be refactored to avoid that, as splice and pipes are inherently
tied together.

By clearing FMODE_NOWAIT if splice is being used on a pipe, other users
of the pipe will know that the pipe is no longer safe for RWF_NOWAIT
and friends.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/splice.c