From: Jaegeuk Kim Date: Wed, 2 Jan 2013 23:57:21 +0000 (+0900) Subject: f2fs: initialize newly allocated dnode structure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d66d1f76878fcb1e78592fe8aecd13f438d6c0d7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git f2fs: initialize newly allocated dnode structure This patch resolves Coverity #753112. In practical, the existing code flow does not fall into the reported errorneous path. But, anyway, let's avoid this for future. Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 8199ee9f5875..280713289d8c 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -211,11 +211,11 @@ struct dnode_of_data { static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode, struct page *ipage, struct page *npage, nid_t nid) { + memset(dn, 0, sizeof(*dn)); dn->inode = inode; dn->inode_page = ipage; dn->node_page = npage; dn->nid = nid; - dn->inode_page_locked = 0; } /*