Commit d66d1f76878fcb1e78592fe8aecd13f438d6c0d7
1 parent
7880ceedec
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/f2fs/f2fs.h
... | ... | @@ -211,11 +211,11 @@ |
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 | /* |