]> err.no Git - linux-2.6/commitdiff
[JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.
authorDavid Woodhouse <dwmw2@infradead.org>
Sun, 28 May 2006 21:13:25 +0000 (22:13 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Sun, 28 May 2006 21:13:25 +0000 (22:13 +0100)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
fs/jffs2/nodelist.c

index 5d36e9b4d7c525cd93cdf990516e79235ed48e76..927dfe42ba76cab92b6fae6a39c09baa71d7f607 100644 (file)
@@ -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