]> err.no Git - linux-2.6/blobdiff - fs/jffs2/nodelist.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[linux-2.6] / fs / jffs2 / nodelist.c
index 5d36e9b4d7c525cd93cdf990516e79235ed48e76..7675b33396c7d7c307c803d0a3db57c95e8371a7 100644 (file)
@@ -906,6 +906,9 @@ void jffs2_del_ino_cache(struct jffs2_sb_info *c, struct jffs2_inode_cache *old)
 {
        struct jffs2_inode_cache **prev;
 
+#ifdef CONFIG_JFFS2_FS_XATTR
+       BUG_ON(old->xref);
+#endif
        dbg_inocache("del %p (ino #%u)\n", old, old->ino);
        spin_lock(&c->inocache_lock);
 
@@ -1139,7 +1142,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