diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-03-07 17:56:28 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-03-15 11:37:29 -0600 |
commit | ec30adeb289d9054efae4e285b269438ce63fe03 (patch) | |
tree | d5eb9bf250fdb2f10248581a290cc70fb2b0f5d1 | |
parent | 2b10649c231642a06e10ea7af288eac1968e6624 (diff) | |
download | idmapping-vfs.pipe.nonblock.tar.gz |
pipe: set FMODE_NOWAIT on pipesv6.4/vfs.pipevfs.pipe.nonblock
The read/write path is now prepared to deal with IOCB_NOWAIT, hence
enable support for that via setting FMODE_NOWAIT on new pipes.
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | fs/pipe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/pipe.c b/fs/pipe.c index dc00b20e56c880..b7e380952fca7f 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -999,6 +999,9 @@ static int __do_pipe_flags(int *fd, struct file **files, int flags) audit_fd_pair(fdr, fdw); fd[0] = fdr; fd[1] = fdw; + /* pipe groks IOCB_NOWAIT */ + files[0]->f_mode |= FMODE_NOWAIT; + files[1]->f_mode |= FMODE_NOWAIT; return 0; err_fdr: |