diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-09-13 18:20:35 +0200 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-03 04:32:03 +0100 |
commit | 05b4358ad564d7a6a51b3717afe771d36711e9c4 (patch) | |
tree | ad8473aadd4a8f8e25aa40bf1bef8f16f7490d83 | |
parent | nilfs2: fix irregular checkpoint creation due to data flush (diff) | |
download | linux-05b4358ad564d7a6a51b3717afe771d36711e9c4.tar.xz linux-05b4358ad564d7a6a51b3717afe771d36711e9c4.zip |
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 <konishi.ryusuke@lab.ntt.co.jp>
-rw-r--r-- | fs/nilfs2/btnode.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |