Message ID | 20230314154203.181070-4-axboe@kernel.dk (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add FMODE_NOWAIT support to pipes | expand |
diff --git a/fs/pipe.c b/fs/pipe.c index dc00b20e56c8..b7e380952fca 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: