summaryrefslogtreecommitdiff
path: root/fs/pipe.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-05-19 12:32:04 +0900
committerMark Brown <broonie@kernel.org>2023-05-19 12:32:04 +0900
commitaf53b00fa3aca3410c89900a34e5d727a27c36e2 (patch)
tree1b51641988e0ae56f8de4a693ab3d1aecc5491d4 /fs/pipe.c
parent98be58f2b517b212b57b8493dab92312a52614ac (diff)
parentf1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6 (diff)
Merge tag 'v6.4-rc2' into asoc-6.5 to get fixes for CI
Linux 6.4-rc2
Diffstat (limited to 'fs/pipe.c')
-rw-r--r--fs/pipe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index ceb17d2dfa19..2d88f73f585a 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -342,7 +342,8 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
break;
if (ret)
break;
- if (filp->f_flags & O_NONBLOCK) {
+ if ((filp->f_flags & O_NONBLOCK) ||
+ (iocb->ki_flags & IOCB_NOWAIT)) {
ret = -EAGAIN;
break;
}
@@ -547,7 +548,8 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
continue;
/* Wait for buffer space to become available. */
- if (filp->f_flags & O_NONBLOCK) {
+ if ((filp->f_flags & O_NONBLOCK) ||
+ (iocb->ki_flags & IOCB_NOWAIT)) {
if (!ret)
ret = -EAGAIN;
break;