Skip to content

Commit a40cd58

Browse files
mjguzikbrauner
authored andcommitted
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>
1 parent ee5eda8 commit a40cd58

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/pipe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,9 @@ anon_pipe_write(struct kiocb *iocb, struct iov_iter *from)
529529

530530
if (!iov_iter_count(from))
531531
break;
532-
}
533532

534-
if (!pipe_full(head, pipe->tail, pipe->max_usage))
535533
continue;
534+
}
536535

537536
/* Wait for buffer space to become available. */
538537
if ((filp->f_flags & O_NONBLOCK) ||

0 commit comments

Comments
 (0)