696 struct jffs2_inode_cache *ic;
697 struct jffs2_raw_node_ref **p;
698
699 spin_lock(&c->erase_completion_lock);
700
701 ic = jffs2_raw_ref_to_ic(ref);
702 for (p = &ic->nodes; (*p) != ref; p = &((*p)->next_in_ino))
703 ;
704
705 *p = ref->next_in_ino;
706 ref->next_in_ino = NULL;
707
708 switch (ic->class) {
709#ifdef CONFIG_JFFS2_FS_XATTR
710 case RAWNODE_CLASS_XATTR_DATUM:
711 jffs2_release_xattr_datum(c, (struct jffs2_xattr_datum *)ic);
712 break;
713 case RAWNODE_CLASS_XATTR_REF:
714 jffs2_release_xattr_ref(c, (struct jffs2_xattr_ref *)ic);
715 break;
716#endif
717 default:
718 if (ic->nodes == (void *)ic && ic->pino_nlink == 0)
719 jffs2_del_ino_cache(c, ic);
720 break;
721 }
722 spin_unlock(&c->erase_completion_lock);
723 }
724
725 out_erase_sem:
726 mutex_unlock(&c->erase_free_sem);
727}
728
729int jffs2_thread_should_wake(struct jffs2_sb_info *c)
730{
731 int ret = 0;
732 uint32_t dirty;
733 int nr_very_dirty = 0;
734 struct jffs2_eraseblock *jeb;
735
736 if (c->unchecked_size) {