mtd/fs/jffs2 nodemgmt.c,1.82,1.83
David Woodhouse
dwmw2 at infradead.org
Wed Sep 25 01:52:49 EDT 2002
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv1598
Modified Files:
nodemgmt.c
Log Message:
c->cleanmarker_size is zero for NAND flash. You can't infer from
(jeb->used_size == c->cleanmarker size) that jeb->first_node != NULL.
And so dereferencing it was naughty.
Index: nodemgmt.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodemgmt.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- nodemgmt.c 24 Sep 2002 14:06:37 -0000 1.82
+++ nodemgmt.c 25 Sep 2002 05:52:47 -0000 1.83
@@ -240,7 +240,7 @@
*ofs = jeb->offset + (c->sector_size - jeb->free_size);
*len = jeb->free_size;
- if (jeb->used_size == c->cleanmarker_size &&
+ if (c->cleanmarker_size && jeb->used_size == c->cleanmarker_size &&
!jeb->first_node->next_in_ino) {
/* Only node in it beforehand was a CLEANMARKER node (we think).
So mark it obsolete now that there's going to be another node
More information about the linux-mtd-cvs
mailing list