mtd/fs/jffs2/ecos/src fs-ecos.c,1.1,1.2

David Woodhouse dwmw2 at infradead.org
Tue Sep 24 03:59:36 EDT 2002


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

Modified Files:
	fs-ecos.c 
Log Message:
Truncate fraglist on open (O_TRUNC)


Index: fs-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/fs-ecos.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fs-ecos.c	11 Jul 2002 10:55:30 -0000	1.1
+++ fs-ecos.c	24 Sep 2002 07:59:33 -0000	1.2
@@ -681,10 +681,12 @@
     
     if( err == ENOERR && (mode & O_TRUNC ) )
     {
+	    struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
+	    struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
         // If the O_TRUNC bit is set we must clean out the file data.
 
         node->i_size = 0;
-
+	jffs2_truncate_fraglist(c, &f->fragtree, 0);
         // Update file times
         node->i_ctime =
         node->i_mtime = cyg_timestamp();





More information about the linux-mtd-cvs mailing list