diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-02 10:25:53 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-02 22:31:36 -0500 |
commit | b1e19e5601277845b4f17ecd7c9ba04f73ee11aa (patch) | |
tree | bdc23c9fcc4bfe58787b63e9c739c0692b79dc4d /fs/nilfs2/btnode.c | |
parent | 1836d95928a0f41ada0cbb2a6c4e46b027db9491 (diff) |
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>
Diffstat (limited to 'fs/nilfs2/btnode.c')
-rw-r--r-- | fs/nilfs2/btnode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index 5941958f1e47..435864ce06be 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c | |||
@@ -276,8 +276,7 @@ void nilfs_btnode_commit_change_key(struct address_space *btnc, | |||
276 | "invalid oldkey %lld (newkey=%lld)", | 276 | "invalid oldkey %lld (newkey=%lld)", |
277 | (unsigned long long)oldkey, | 277 | (unsigned long long)oldkey, |
278 | (unsigned long long)newkey); | 278 | (unsigned long long)newkey); |
279 | if (!test_set_buffer_dirty(obh) && TestSetPageDirty(opage)) | 279 | nilfs_btnode_mark_dirty(obh); |
280 | BUG(); | ||
281 | 280 | ||
282 | spin_lock_irq(&btnc->tree_lock); | 281 | spin_lock_irq(&btnc->tree_lock); |
283 | radix_tree_delete(&btnc->page_tree, oldkey); | 282 | radix_tree_delete(&btnc->page_tree, oldkey); |