Skip to content

Commit b1e19e5

Browse files
committed
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: 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>
1 parent 1836d95 commit b1e19e5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/nilfs2/btnode.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ void nilfs_btnode_commit_change_key(struct address_space *btnc,
276276
"invalid oldkey %lld (newkey=%lld)",
277277
(unsigned long long)oldkey,
278278
(unsigned long long)newkey);
279-
if (!test_set_buffer_dirty(obh) && TestSetPageDirty(opage))
280-
BUG();
279+
nilfs_btnode_mark_dirty(obh);
281280

282281
spin_lock_irq(&btnc->tree_lock);
283282
radix_tree_delete(&btnc->page_tree, oldkey);

0 commit comments

Comments
 (0)