Commit 26f260ce authored by pengdonglin's avatar pengdonglin Committed by Theodore Ts'o
Browse files

ext4: remove unnecessary zero-initialization via memset



The d_path function does not require the caller to pre-zero the
buffer.

Signed-off-by: default avatarpengdonglin <pengdonglin@xiaomi.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarBaokun Li <libaokun1@huawei.com>
Link: https://patch.msgid.link/20251211123829.2777009-1-dolinux.peng@gmail.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 1f8dd813
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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));