nilfs2: fix dirty page accounting leak causing hang at write
commit61ac9e400eb6c0c3d3e9da24c78176fbe272fc1b
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 2 Nov 2009 15:25:53 +0000 (3 00:25 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:22:35 +0000 (9 16:22 -0800)
treedb95ef9a3dfcb838486e187b5ac26d58521f77d7
parent092afb745d0dfdd6cf5ed86ed301023285700fd2
nilfs2: fix dirty page accounting leak causing hang at write

commit b1e19e5601277845b4f17ecd7c9ba04f73ee11aa upstream.

Bruno Prémont and Dunphy, Bill noticed me that NILFS will certainly
hang on ARM-based targets.

I found this was caused by an underflow of dirty pages counter.  A
b-tree cache routine was marking page dirty without adjusting page
account information.

This fixes the dirty page accounting leak and resolves the hang on
arm-based targets.

Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Reported-by: Dunphy, Bill <WDunphy@tandbergdata.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nilfs2/btnode.c