mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baokun Li <libaokun1@huawei.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 14:12:37 +0800	[thread overview]
Message-ID: <5d560ad4-98be-4827-b1fb-e9b2caca6cf1@huawei.com> (raw)
In-Reply-To: <20251211123829.2777009-1-dolinux.peng@gmail.com>

On 2025-12-11 20:38, 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>

Looks good. Feel free to add:

Reviewed-by: Baokun Li <libaokun1@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));



  reply	other threads:[~2025-12-16  6:12 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 [this message]
2025-12-16  7:59 ` Zhang Yi
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=5d560ad4-98be-4827-b1fb-e9b2caca6cf1@huawei.com \
    --to=libaokun1@huawei.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®