From: Max Kellermann <max.kellermann@gmail.com>
To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Max Kellermann <max.kellermann@gmail.com>
Subject: [PATCH 2/4] fs/pipe: remove duplicate "offset" initializer
Date: Fri, 25 Feb 2022 19:54:29 +0100 [thread overview]
Message-ID: <20220225185431.2617232-2-max.kellermann@gmail.com> (raw)
In-Reply-To: <20220225185431.2617232-1-max.kellermann@gmail.com>
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@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
To: linux-kernel@vger.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@gmail.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
next prev parent reply other threads:[~2022-02-25 18:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 18:54 [PATCH 1/4] include/pipe_fs_i.h: add missing #includes Max Kellermann
2022-02-25 18:54 ` Max Kellermann [this message]
2022-02-25 18:54 ` [PATCH 3/4] fs/pipe: remove unnecessary "buf" initializer Max Kellermann
2022-02-25 18:54 ` [PATCH 4/4] pipe_fs_i.h: add pipe_buf_init() Max Kellermann
2022-03-13 2:37 ` Al Viro
2022-03-13 2:48 ` Matthew Wilcox
2022-03-13 4:34 ` Al Viro
2022-03-13 6:47 ` Max Kellermann
2022-03-13 1:49 ` [PATCH 1/4] include/pipe_fs_i.h: add missing #includes Al Viro
2022-03-13 6:45 ` Max Kellermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220225185431.2617232-2-max.kellermann@gmail.com \
--to=max.kellermann@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox