]> err.no Git - linux-2.6/blobdiff - fs/jffs2/nodemgmt.c
Merge git://oss.sgi.com:8090/xfs/linux-2.6
[linux-2.6] / fs / jffs2 / nodemgmt.c
index 747a73f0aa4d3b8dcf25dfec74fd4a1631fb4a0d..a9bf9603c1ba0cca4fac8d56ea2dae4bbfe33b91 100644 (file)
@@ -116,7 +116,10 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
                        spin_unlock(&c->erase_completion_lock);
 
                        ret = jffs2_garbage_collect_pass(c);
-                       if (ret)
+
+                       if (ret == -EAGAIN)
+                               jffs2_erase_pending_blocks(c, 1);
+                       else if (ret)
                                return ret;
 
                        cond_resched();
@@ -706,7 +709,7 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
                                break;
 #endif
                        default:
-                               if (ic->nodes == (void *)ic && ic->nlink == 0)
+                               if (ic->nodes == (void *)ic && ic->pino_nlink == 0)
                                        jffs2_del_ino_cache(c, ic);
                                break;
                }