ext4:memset is needless in ext4_ext_remove_space()
Subsystems (2)
PATCH 1/1 ext4:memset is needless in ext4_ext_remove_space()
memset is needless because path is allocated by kzalloc.
--- fs/ext4/extents.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
fs/ext4/extents.c +0 -1
@@ -2375,7 +2375,6 @@ again:/* go to the next level */ ext_debug ("move to level %d (block %llu)\n" , i +1 ,ext4_idx_pblock (path[i].p_idx)); -memset (path + i +1 ,0 ,sizeof (*path)); bh =sb_bread (sb,ext4_idx_pblock (path[i].p_idx));if (!bh) {/* should we reset i_size? */
Signature · 7 lines
1.6.6 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · 潘卫平(Peter Pan)
memset is needless because path is allocated by kzalloc.
This is inside a loop and sometimes we do i++ and sometimes i--. Are you absolutely positive that path + i isn't initialized?
I haven't followed this code through all the way but my instinct is that the memset is there for a reason.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Dan Carpenter
This is inside a loop and sometimes we do i++ and sometimes i--. Are you absolutely positive that path + i isn't initialized?
I haven't followed this code through all the way but my instinct is that the memset is there for a reason.
I know that I misunderstood it.
Thank you!
Regards
Peter Pan