From: Zhang Yi <yi.zhang@huaweicloud.com>
To: Donglin Peng <dolinux.peng@gmail.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
pengdonglin <pengdonglin@xiaomi.com>
Subject: Re: [PATCH] fs/ext4: Remove unnecessary zero-initialization via memset
Date: Tue, 16 Dec 2025 15:59:27 +0800 [thread overview]
Message-ID: <8f7133f3-5303-4782-84da-e43fc57e86e3@huaweicloud.com> (raw)
In-Reply-To: <20251211123829.2777009-1-dolinux.peng@gmail.com>
On 12/11/2025 8:38 PM, Donglin Peng wrote:
> From: pengdonglin <pengdonglin@xiaomi.com>
>
> The d_path function does not require the caller to pre-zero the
> buffer.
>
> Signed-off-by: pengdonglin <pengdonglin@xiaomi.com>
This should just be a cleanup.
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
> ---
> fs/ext4/file.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/ext4/file.c b/fs/ext4/file.c
> index 7a8b30932189..484cb7388802 100644
> --- a/fs/ext4/file.c
> +++ b/fs/ext4/file.c
> @@ -858,7 +858,6 @@ static int ext4_sample_last_mounted(struct super_block *sb,
> * when trying to sort through large numbers of block
> * devices or filesystem images.
> */
> - memset(buf, 0, sizeof(buf));
> path.mnt = mnt;
> path.dentry = mnt->mnt_root;
> cp = d_path(&path, buf, sizeof(buf));
next prev parent reply other threads:[~2025-12-16 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 12:38 Donglin Peng
2025-12-16 6:12 ` Baokun Li
2025-12-16 7:59 ` Zhang Yi [this message]
2026-01-28 18:04 ` Theodore Ts'o
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=8f7133f3-5303-4782-84da-e43fc57e86e3@huaweicloud.com \
--to=yi.zhang@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=dolinux.peng@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pengdonglin@xiaomi.com \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®