From: Ryusuke Konishi Date: Sun, 13 Sep 2009 16:20:35 +0000 (+0900) Subject: nilfs2: add zero-fill for new btree node buffers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05b4358ad564d7a6a51b3717afe771d36711e9c4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nilfs2: add zero-fill for new btree node buffers Adds missing initialization of newly allocated b-tree node buffers. This avoids garbage data to be mixed in b-tree node blocks. Signed-off-by: Ryusuke Konishi --- diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index 435864ce06be..84c25382f8e3 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c @@ -87,6 +87,7 @@ int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr, brelse(bh); BUG(); } + memset(bh->b_data, 0, 1 << inode->i_blkbits); bh->b_bdev = NILFS_I_NILFS(inode)->ns_bdev; bh->b_blocknr = blocknr; set_buffer_mapped(bh);