diff mbox series

fs/pipe: remove duplicate "offset" initializer

Message ID 20230919074045.1066796-1-max.kellermann@ionos.com (mailing list archive)
State New, archived
Headers show
Series fs/pipe: remove duplicate "offset" initializer | expand

Commit Message

Max Kellermann Sept. 19, 2023, 7:40 a.m. UTC
This code duplication was introduced by commit a194dfe6e6f6 ("pipe:
Rearrange sequence in pipe_write() to preallocate slot"), but since
the pipe's mutex is locked, nobody else can modify the value
meanwhile.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
 fs/pipe.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Christian Brauner Sept. 19, 2023, 1:57 p.m. UTC | #1
On Tue, 19 Sep 2023 09:40:44 +0200, Max Kellermann wrote:
> This code duplication was introduced by commit a194dfe6e6f6 ("pipe:
> Rearrange sequence in pipe_write() to preallocate slot"), but since
> the pipe's mutex is locked, nobody else can modify the value
> meanwhile.
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] fs/pipe: remove duplicate "offset" initializer
      https://git.kernel.org/vfs/vfs/c/adbb6dc7bfbd
diff mbox series

Patch

diff --git a/fs/pipe.c b/fs/pipe.c
index 6c1a9b1db907..139190165a1c 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -537,7 +537,6 @@  pipe_write(struct kiocb *iocb, struct iov_iter *from)
 				break;
 			}
 			ret += copied;
-			buf->offset = 0;
 			buf->len = copied;
 
 			if (!iov_iter_count(from))