From: pengdonglin Date: Thu, 11 Dec 2025 12:38:29 +0000 (+0800) Subject: ext4: remove unnecessary zero-initialization via memset X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26f260ce5828fc7897a70629884916301f5825d0;p=thirdparty%2Flinux.git ext4: remove unnecessary zero-initialization via memset The d_path function does not require the caller to pre-zero the buffer. Signed-off-by: pengdonglin Reviewed-by: Zhang Yi Reviewed-by: Baokun Li Link: https://patch.msgid.link/20251211123829.2777009-1-dolinux.peng@gmail.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 7a8b309321892..484cb73888024 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));