From: Jens Axboe <[email protected]>
To: [email protected], [email protected]
Cc: Jens Axboe <[email protected]>
Subject: [PATCH 3/3] pipe: set FMODE_NOWAIT on pipes
Date: Tue, 7 Mar 2023 20:10:33 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
The read/write path is now prepared to deal with IOCB_NOWAIT, hence
enable support for that via setting FMODE_NOWAIT on new pipes.
Signed-off-by: Jens Axboe <[email protected]>
---
fs/pipe.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/pipe.c b/fs/pipe.c
index 10366a6cb5b6..9db274f9baa5 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -994,6 +994,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:
--
2.39.2
next prev parent reply other threads:[~2023-03-08 3:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 3:10 [PATCHSET for-next 0/3] Add FMODE_NOWAIT support to pipes Jens Axboe
2023-03-08 3:10 ` [PATCH 1/3] fs: add 'nonblock' parameter to pipe_buf_confirm() and fops method Jens Axboe
2023-03-14 9:11 ` Christian Brauner
2023-03-08 3:10 ` [PATCH 2/3] pipe: enable handling of IOCB_NOWAIT Jens Axboe
2023-03-14 9:26 ` Christian Brauner
2023-03-14 12:03 ` Jens Axboe
2023-03-14 9:38 ` Matthew Wilcox
2023-03-14 12:04 ` Jens Axboe
2023-03-08 3:10 ` Jens Axboe [this message]
2023-03-14 9:26 ` [PATCH 3/3] pipe: set FMODE_NOWAIT on pipes Christian Brauner
2023-03-08 3:33 ` [PATCHSET for-next 0/3] Add FMODE_NOWAIT support to pipes Jens Axboe
2023-03-08 6:46 ` Dave Chinner
2023-03-08 14:30 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2023-03-14 15:42 [PATCHSET v2 " Jens Axboe
2023-03-14 15:42 ` [PATCH 3/3] pipe: set FMODE_NOWAIT on pipes Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox