jffs2 lost pointer to the allocated memory
Per Hedblom
per.hedblom at abem.se
Mon Dec 20 18:33:11 EST 2004
Hi,
I checked all calls to jffs2_alloc_raw_node_ref() in the jffs2 code and
found one strange call in gc.c where the pointer to the allocated memory is
lost immediately.
cvs -z5 diff -u -wb -p gc.c (in directory C:\cvs\mtd\fs\jffs2\)
Index: gc.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/gc.c,v
retrieving revision 1.143
diff -u -w -b -p -r1.143 gc.c
--- gc.c 16 Nov 2004 20:36:11 -0000 1.143
+++ gc.c 20 Dec 2004 22:41:20 -0000
@@ -602,7 +602,7 @@ static int jffs2_garbage_collect_pristin
printk(KERN_NOTICE "Not marking the space at 0x%08x
as dirty because the flash driver returned retlen zero\n",
nraw->flash_offset);
jffs2_free_raw_node_ref(nraw);
}
- if (!retried && (nraw == jffs2_alloc_raw_node_ref())) {
+ if (!retried && (nraw = jffs2_alloc_raw_node_ref())) {
/* Try to reallocate space and retry */
uint32_t dummy;
struct jffs2_eraseblock *jeb = &c->blocks[phys_ofs /
c->sector_size];
/Per
More information about the linux-mtd
mailing list