Commit d66d1f76 authored by Jaegeuk Kim's avatar Jaegeuk Kim

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: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 7880ceed
...@@ -211,11 +211,11 @@ struct dnode_of_data { ...@@ -211,11 +211,11 @@ struct dnode_of_data {
static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode, static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode,
struct page *ipage, struct page *npage, nid_t nid) struct page *ipage, struct page *npage, nid_t nid)
{ {
memset(dn, 0, sizeof(*dn));
dn->inode = inode; dn->inode = inode;
dn->inode_page = ipage; dn->inode_page = ipage;
dn->node_page = npage; dn->node_page = npage;
dn->nid = nid; dn->nid = nid;
dn->inode_page_locked = 0;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment