Skip to contentSkip to conversation

f2fs: remove unneeded initialization of nr_dirty in dirty_seglist_info

PATCH In review Namjae Jeon 1 participant 1 message Dec 22, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 f2fs: remove unneeded initialization of nr_dirty in dirty_seglist_info

From: Namjae Jeon <[email protected]>

Since, the memory for the object of dirty_seglist_info is allocated using kzalloc - which returns zeroed out memory. So, there is no need to initialize the nr_dirty values with zeroes.

---
 fs/f2fs/segment.c |    1 -
 1 file changed, 1 deletion(-)
fs/f2fs/segment.c +0 -1
index ffacee4..b0ec996 100644
@@ -1573,7 +1573,6 @@ static int build_dirty_segmap(struct f2fs_sb_info *sbi)
 
 	for (i = 0; i < NR_DIRTY_TYPE; i++) {
 		dirty_i->dirty_segmap[i] = kzalloc(bitmap_size, GFP_KERNEL);
-		dirty_i->nr_dirty[i] = 0;
 		if (!dirty_i->dirty_segmap[i])
 			return -ENOMEM;
 	}
Signature · 1 line
1.7.9.5