mtd/fs/jffs2 nodelist.c,1.111,1.112

Artem Bityuckiy dedekind at infradead.org
Mon Aug 22 05:07:12 EDT 2005


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv10991

Modified Files:
	nodelist.c 
Log Message:
[JFFS2] bugfix - frag->node may be for holes



Index: nodelist.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- nodelist.c	17 Aug 2005 14:57:39 -0000	1.111
+++ nodelist.c	22 Aug 2005 09:07:09 -0000	1.112
@@ -80,7 +80,7 @@
 	 * REF_PRISTINE irrespective of its size.
 	 */
 	frag = frag_last(list);
-	if ((frag->ofs & (PAGE_CACHE_SIZE - 1)) == 0) {
+	if (frag->node && (frag->ofs & (PAGE_CACHE_SIZE - 1)) == 0) {
 		JFFS2_DBG_FRAGTREE2("marking the last fragment 0x%08x-0x%08x REF_PRISTINE.\n",
 			frag->ofs, frag->ofs + frag->size); 
 		frag->node->raw->flash_offset = ref_offset(frag->node->raw) | REF_PRISTINE;





More information about the linux-mtd-cvs mailing list