Skip to content

Commit

Permalink
f2fs: remove unneeded initialization of nr_dirty in dirty_seglist_info
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Namjae Jeon authored and Jaegeuk Kim committed Dec 28, 2012
1 parent 06025f4 commit 344324f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,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;
}
Expand Down

0 comments on commit 344324f

Please sign in to comment.