Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: erase.c,v 1.72 2005/02/27 23:01:32 dwmw2 Exp $
+ * $Id: erase.c,v 1.74 2005/03/20 17:46:20 dedekind Exp $
  *
  */
 
                printk("\n");
        });
 
-       if (ic->nodes == (void *)ic)
+       if (ic->nodes == (void *)ic && ic->nlink == 0)
                jffs2_del_ino_cache(c, ic);
 }
 
 
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: nodemgmt.c,v 1.119 2005/02/28 08:21:05 dedekind Exp $
+ * $Id: nodemgmt.c,v 1.120 2005/03/20 17:46:20 dedekind Exp $
  *
  */
 
                *p = ref->next_in_ino;
                ref->next_in_ino = NULL;
 
-               if (ic->nodes == (void *)ic)
+               if (ic->nodes == (void *)ic && ic->nlink == 0)
                        jffs2_del_ino_cache(c, ic);
 
                spin_unlock(&c->erase_completion_lock);