* [PATCH 3/5] f2fs: remove unneeded initialization of nr_dirty in dirty_seglist_info
@ 2012-12-22 3:09 Namjae Jeon
0 siblings, 0 replies; only message in thread
From: Namjae Jeon @ 2012-12-22 3:09 UTC (permalink / raw)
To: jaegeuk.kim
Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, Namjae Jeon,
Namjae Jeon, Amit Sahrawat
From: Namjae Jeon <namjae.jeon@samsung.com>
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>
---
fs/f2fs/segment.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index ffacee4..b0ec996 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-22 3:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-22 3:09 [PATCH 3/5] f2fs: remove unneeded initialization of nr_dirty in dirty_seglist_info Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).