mtd/fs/jffs2 build.c,1.82,1.83
Artem Bityutskiy
dedekind at infradead.org
Wed Sep 21 11:52:37 EDT 2005
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv8856
Modified Files:
build.c
Log Message:
[JFFS2] roll-back the last fix. JFFS2 uses strange technique - upper callers
clean the shit which the lower function leave... In theory, everybody should
free its own crap... Would be nice to fix - i believe, not everything is
cleaned well.
Index: build.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/build.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- build.c 21 Sep 2005 14:48:22 -0000 1.82
+++ build.c 21 Sep 2005 15:52:33 -0000 1.83
@@ -349,28 +349,23 @@
ret = jffs2_sum_init(c);
if (ret)
- goto error;
+ return ret;
- ret = jffs2_build_filesystem(c);
- if (ret) {
- dbg_fsbuild("failed to build FS\n");
+ if (jffs2_build_filesystem(c)) {
+ dbg_fsbuild("build_fs failed\n");
jffs2_free_ino_caches(c);
jffs2_free_raw_node_refs(c);
- goto error;
+#ifndef __ECOS
+ if (jffs2_blocks_use_vmalloc(c))
+ vfree(c->blocks);
+ else
+#endif
+ kfree(c->blocks);
+
+ return -EIO;
}
jffs2_calc_trigger_levels(c);
return 0;
-
-error:
-
-#ifndef __ECOS
- if (jffs2_blocks_use_vmalloc(c))
- vfree(c->blocks);
- else
-#endif
- kfree(c->blocks);
-
- return ret;
}
More information about the linux-mtd-cvs
mailing list