fs/ext4: Remove unnecessary zero-initialization via memset
PATCH 1/1 fs/ext4: Remove unnecessary zero-initialization via memset
From: pengdonglin <[email protected]>
The d_path function does not require the caller to pre-zero the buffer.
Signed-off-by pengdonglin <[email protected]>
--- fs/ext4/file.c | 1 - 1 file changed, 1 deletion(-)
fs/ext4/file.c +0 -1
@@ -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));
Signature · 1 line
2.34.1
Quoted 6 lines · Donglin Peng
From: pengdonglin <[email protected]>
The
d_pathfunction does not require the caller to pre-zero the buffer.Signed-off-by pengdonglin <[email protected]>
Looks good. Feel free to add:
Reviewed-by Baokun Li <[email protected]>
Quoted 16 lines
--- fs/ext4/file.c | 1 - 1 file changed, 1 deletion(-)fs/ext4/file.c +0
-1@@ -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));
Quoted 6 lines · Donglin Peng
From: pengdonglin <[email protected]>
The
d_pathfunction does not require the caller to pre-zero the buffer.Signed-off-by pengdonglin <[email protected]>
This should just be a cleanup.
Reviewed-by Zhang Yi <[email protected]>
Quoted 16 lines
--- fs/ext4/file.c | 1 - 1 file changed, 1 deletion(-)fs/ext4/file.c +0
-1@@ -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));
Quoted 4 lines · Donglin Peng
The
d_pathfunction does not require the caller to pre-zero the buffer.
Applied, thanks!
[1/1] fs/ext4: Remove unnecessary zero-initialization via memset
commit: 26f260ce5828fc7897a70629884916301f5825d0
Best regards,
Signature · 1 line
Theodore Ts'o <[email protected]>