Skip to contentSkip to conversation

f2fs: use __GFP_ZERO to avoid appending set-NULL

PATCH In review Gu Zheng 1 participant 1 message Apr 11, 2014

Subsystems (2)
lore
Share & tools
lore

Gu Zheng

author
#0 lore raw

PATCH 3/7 f2fs: use __GFP_ZERO to avoid appending set-NULL

---
 fs/f2fs/segment.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
fs/f2fs/segment.c +1 -3
index 8a6fe2a..ff8f987 100644
@@ -243,9 +243,7 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi)
 	if (!test_opt(sbi, FLUSH_MERGE))
 		return blkdev_issue_flush(sbi->sb->s_bdev, GFP_KERNEL, NULL);
 
-	cmd = f2fs_kmem_cache_alloc(flush_cmd_slab, GFP_ATOMIC);
-	cmd->next = NULL;
-	cmd->ret = 0;
+	cmd = f2fs_kmem_cache_alloc(flush_cmd_slab, GFP_ATOMIC | __GFP_ZERO);
 	init_completion(&cmd->wait);
 
 	spin_lock(&sm_i->issue_lock);
Signature · 9 lines
1.7.7


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees