[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220225185431.2617232-2-max.kellermann@gmail.com>
Date: Fri, 25 Feb 2022 19:54:29 +0100
From: Max Kellermann <max.kellermann@...il.com>
To: viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Max Kellermann <max.kellermann@...il.com>
Subject: [PATCH 2/4] fs/pipe: remove duplicate "offset" initializer
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.
To: Alexander Viro <viro@...iv.linux.org.uk>
To: linux-fsdevel@...r.kernel.org
To: linux-kernel@...r.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@...il.com>
---
fs/pipe.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index da842d13029d..aca717a89631 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -535,7 +535,6 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
break;
}
ret += copied;
- buf->offset = 0;
buf->len = copied;
if (!iov_iter_count(from))
--
2.34.0
Powered by blists - more mailing lists