summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-28 22:13:25 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-28 22:13:25 +0100
commit2ebf09c2491433a499e0ae7723d04e9e810afa84 (patch)
tree82b0c67ceffe6796f4f7c30af3e724c56095dcc2
parentddc58bd65ebe58c243e9f609384825df9ffd04ad (diff)
downloadop-kernel-dev-2ebf09c2491433a499e0ae7723d04e9e810afa84.zip
op-kernel-dev-2ebf09c2491433a499e0ae7723d04e9e810afa84.tar.gz
[JFFS2] Fix oops when marking space dirty in scan, but no previous node exists.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r--fs/jffs2/nodelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index 5d36e9b..927dfe4 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
OpenPOWER on IntegriCloud