Skip to content

Commit

Permalink
nilfs2: fix dirty page accounting leak causing hang at write
Browse files Browse the repository at this point in the history
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>
Cc: stable <stable@kernel.org>
  • Loading branch information
Ryusuke Konishi committed Nov 3, 2009
1 parent 1836d95 commit b1e19e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nilfs2/btnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ void nilfs_btnode_commit_change_key(struct address_space *btnc,
"invalid oldkey %lld (newkey=%lld)",
(unsigned long long)oldkey,
(unsigned long long)newkey);
if (!test_set_buffer_dirty(obh) && TestSetPageDirty(opage))
BUG();
nilfs_btnode_mark_dirty(obh);

spin_lock_irq(&btnc->tree_lock);
radix_tree_delete(&btnc->page_tree, oldkey);
Expand Down

0 comments on commit b1e19e5

Please sign in to comment.