projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee5eda8
)
pipe: drop an always true check in anon_pipe_write()
author
Mateusz Guzik
<mjguzik@gmail.com>
Mon, 3 Mar 2025 23:04:07 +0000
(
00:04
+0100)
committer
Christian Brauner
<brauner@kernel.org>
Tue, 4 Mar 2025 08:46:06 +0000
(09:46 +0100)
The check operates on the stale value of 'head' and always loops back.
Just do it unconditionally. No functional changes.
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link:
https://lore.kernel.org/r/20250303230409.452687-2-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/pipe.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/pipe.c
b/fs/pipe.c
index b0641f75b1bae931821f136f234f91fe6dc62b6b..b60487b650cb730db22fc6a62c998b094f806e00 100644
(file)
--- a/
fs/pipe.c
+++ b/
fs/pipe.c
@@
-529,10
+529,9
@@
anon_pipe_write(struct kiocb *iocb, struct iov_iter *from)
if (!iov_iter_count(from))
break;
- }
- if (!pipe_full(head, pipe->tail, pipe->max_usage))
continue;
+ }
/* Wait for buffer space to become available. */
if ((filp->f_flags & O_NONBLOCK) ||