summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorpengdonglin <pengdonglin@xiaomi.com>2025-12-11 20:38:29 +0800
committerTheodore Ts'o <tytso@mit.edu>2026-01-19 20:13:57 -0500
commit26f260ce5828fc7897a70629884916301f5825d0 (patch)
tree982919fde695b2dbb816ab3dbb72a0bbb03afa01 /fs/ext4
parent1f8dd813a1c771b13c303f73d876164bc9b327cc (diff)
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 <pengdonglin@xiaomi.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Baokun Li <libaokun1@huawei.com> Link: https://patch.msgid.link/20251211123829.2777009-1-dolinux.peng@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/file.c1
1 files changed, 0 insertions, 1 deletions
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));