[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d560ad4-98be-4827-b1fb-e9b2caca6cf1@huawei.com>
Date: Tue, 16 Dec 2025 14:12:37 +0800
From: Baokun Li <libaokun1@...wei.com>
To: Donglin Peng <dolinux.peng@...il.com>
CC: <tytso@....edu>, <adilger.kernel@...ger.ca>, <linux-ext4@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, pengdonglin <pengdonglin@...omi.com>
Subject: Re: [PATCH] fs/ext4: Remove unnecessary zero-initialization via
memset
On 2025-12-11 20:38, Donglin Peng wrote:
> From: pengdonglin <pengdonglin@...omi.com>
>
> The d_path function does not require the caller to pre-zero the
> buffer.
>
> Signed-off-by: pengdonglin <pengdonglin@...omi.com>
Looks good. Feel free to add:
Reviewed-by: Baokun Li <libaokun1@...wei.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));
Powered by blists - more mailing lists