f2fs: use __GFP_ZERO to avoid appending set-NULL
authorGu Zheng <guz.fnst@cn.fujitsu.com>
Fri, 11 Apr 2014 09:49:50 +0000 (17:49 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Wed, 7 May 2014 01:21:53 +0000 (10:21 +0900)
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/segment.c

index 524b7ed36e0acc8a24cd4d558f440cf9e9d39826..ba067b1b81078da8a3b3b7289493d01d489e3c9a 100644 (file)
@@ -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);