Commit b1e19e56 authored by Ryusuke Konishi's avatar Ryusuke Konishi

nilfs2: fix dirty page accounting leak causing hang at write

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: default avatarBruno Prémont <bonbons@linux-vserver.org>
Reported-by: default avatarDunphy, Bill <WDunphy@tandbergdata.com>
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
Cc: stable <stable@kernel.org>
parent 1836d959
...@@ -276,8 +276,7 @@ void nilfs_btnode_commit_change_key(struct address_space *btnc, ...@@ -276,8 +276,7 @@ void nilfs_btnode_commit_change_key(struct address_space *btnc,
"invalid oldkey %lld (newkey=%lld)", "invalid oldkey %lld (newkey=%lld)",
(unsigned long long)oldkey, (unsigned long long)oldkey,
(unsigned long long)newkey); (unsigned long long)newkey);
if (!test_set_buffer_dirty(obh) && TestSetPageDirty(opage)) nilfs_btnode_mark_dirty(obh);
BUG();
spin_lock_irq(&btnc->tree_lock); spin_lock_irq(&btnc->tree_lock);
radix_tree_delete(&btnc->page_tree, oldkey); radix_tree_delete(&btnc->page_tree, oldkey);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment