Skip to content

Commit

Permalink
nilfs2: add zero-fill for new btree node buffers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ryusuke Konishi committed Nov 3, 2009
1 parent aeda7f6 commit 05b4358
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nilfs2/btnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 05b4358

Please sign in to comment.