From 2ebf09c2491433a499e0ae7723d04e9e810afa84 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 28 May 2006 22:13:25 +0100 Subject: [JFFS2] Fix oops when marking space dirty in scan, but no previous node exists. Signed-off-by: David Woodhouse --- fs/jffs2/nodelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/jffs2/nodelist.c') diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index 5d36e9b4d7c5..927dfe42ba76 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -1139,7 +1139,7 @@ int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb BUG(); } /* REF_EMPTY_NODE is !obsolete, so that works OK */ - if (ref_obsolete(jeb->last_node)) { + if (jeb->last_node && ref_obsolete(jeb->last_node)) { #ifdef TEST_TOTLEN jeb->last_node->__totlen += size; #endif -- cgit v1.2.3