Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jaegeuk.kim@samsung.com>

+1 -1
+1 -1
fs/f2fs/f2fs.h
··· 211 211 static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode, 212 212 struct page *ipage, struct page *npage, nid_t nid) 213 213 { 214 + memset(dn, 0, sizeof(*dn)); 214 215 dn->inode = inode; 215 216 dn->inode_page = ipage; 216 217 dn->node_page = npage; 217 218 dn->nid = nid; 218 - dn->inode_page_locked = 0; 219 219 } 220 220 221 221 /*