nilfs2: fix incorrect block address termination in node concatenation
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Wed, 25 May 2011 14:00:27 +0000 (23:00 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sat, 11 Jun 2011 06:51:15 +0000 (15:51 +0900)
commitfe744fdb74f2417d8571faefa45f72b0ead25f89
tree516655aad7800018483724cce93c24c2418fc1f4
parent59c5f46fbe01a00eedf54a23789634438bb80603
nilfs2: fix incorrect block address termination in node concatenation

nilfs_btree_delete function wrongly terminates virtual block address
of the btree node held by its parent at index 0.  When concatenating
the index-0 node with its right sibling node, nilfs_btree_delete
terminates the block address of index-0 node instead of the right
sibling node which should be deleted.

This bug not only wears disk space in the long run, but also causes
file system corruption.  This will fix it.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/btree.c