diff options
author | Mateusz Guzik <mjguzik@gmail.com> | 2025-03-04 00:04:07 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-03-04 09:46:06 +0100 |
commit | a40cd5849dab4906f54f27e28561bd9298455bcf (patch) | |
tree | c81453db00b59765c2cec22409bd6e9150fb5cd0 /fs/pipe.c | |
parent | ee5eda8ea59546af2e8f192c060fbf29862d7cbd (diff) |
pipe: drop an always true check in anon_pipe_write()
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>
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/pipe.c b/fs/pipe.c index b0641f75b1ba..b60487b650cb 100644 --- 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) || |