diff options
author | Artem B. Bityutskiy <dedekind@infradead.org> | 2005-08-22 05:07:12 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 14:32:36 -0500 |
commit | f0507530cbedf37515e0d803c332cdb81b34e71a (patch) | |
tree | b9a91ac68b4b48a6bb910fcbea51cac4f70233d5 /fs | |
parent | 280562b2104c9a0ca7efc5e716b6452a7ba820fa (diff) |
[JFFS2] Solve BUG caused by frag->node representing a hole in fragtree
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/nodelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index fd21f109fbd2..9abb5f4cfd75 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: nodelist.c,v 1.111 2005/08/17 14:57:39 dedekind Exp $ | 10 | * $Id: nodelist.c,v 1.112 2005/08/22 09:07:09 dedekind Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -80,7 +80,7 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint | |||
80 | * REF_PRISTINE irrespective of its size. | 80 | * REF_PRISTINE irrespective of its size. |
81 | */ | 81 | */ |
82 | frag = frag_last(list); | 82 | frag = frag_last(list); |
83 | if ((frag->ofs & (PAGE_CACHE_SIZE - 1)) == 0) { | 83 | if (frag->node && (frag->ofs & (PAGE_CACHE_SIZE - 1)) == 0) { |
84 | JFFS2_DBG_FRAGTREE2("marking the last fragment 0x%08x-0x%08x REF_PRISTINE.\n", | 84 | JFFS2_DBG_FRAGTREE2("marking the last fragment 0x%08x-0x%08x REF_PRISTINE.\n", |
85 | frag->ofs, frag->ofs + frag->size); | 85 | frag->ofs, frag->ofs + frag->size); |
86 | frag->node->raw->flash_offset = ref_offset(frag->node->raw) | REF_PRISTINE; | 86 | frag->node->raw->flash_offset = ref_offset(frag->node->raw) | REF_PRISTINE; |