ext4_fs: zero the inode when allocated
authorngkaho1234 <ngkaho1234@gmail.com>
Mon, 16 May 2016 11:59:46 +0000 (11:59 +0000)
committerngkaho1234 <ngkaho1234@gmail.com>
Mon, 16 May 2016 13:51:01 +0000 (13:51 +0000)
src/ext4_fs.c

index e8a2777fbbcee5190f95d59ecdbf31d1fe7232bd..8a0be5b7756794f06f7d9a3ffbf89de0e4e45c6b 100644 (file)
@@ -864,6 +864,8 @@ int ext4_fs_alloc_inode(struct ext4_fs *fs, struct ext4_inode_ref *inode_ref,
        /* Initialize i-node */
        struct ext4_inode *inode = inode_ref->inode;
 
+       memset(inode, 0, inode_size);
+
        uint32_t mode;
        if (is_dir) {
                /*