Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>

+1 -1
+1 -1
fs/jffs2/nodelist.c
··· 1139 1139 BUG(); 1140 1140 } 1141 1141 /* REF_EMPTY_NODE is !obsolete, so that works OK */ 1142 - if (ref_obsolete(jeb->last_node)) { 1142 + if (jeb->last_node && ref_obsolete(jeb->last_node)) { 1143 1143 #ifdef TEST_TOTLEN 1144 1144 jeb->last_node->__totlen += size; 1145 1145 #endif