mtd/fs/jffs2 file.c,1.103,1.104

tpoynor at infradead.org tpoynor at infradead.org
Tue Oct 18 19:29:38 EDT 2005


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

Modified Files:
	file.c 
Log Message:
[JFFS2] Return 0, not number of bytes written, for success at commit_write

Some callers to block-layer commit_write function treat non-zero return as
error, notably the loopback mount driver sometimes used in conjunction with
JFFS2 on NAND flash for bad block avoidance, etc.  Return zero for success
as do various other commit_write functions.

Signed-off-by: Todd Poynor <tpoynor at mvista.com>


Index: file.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/file.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- file.c	7 Sep 2005 08:34:54 -0000	1.103
+++ file.c	18 Oct 2005 23:29:35 -0000	1.104
@@ -282,6 +282,6 @@
 		ClearPageUptodate(pg);
 	}
 
-	D1(printk(KERN_DEBUG "jffs2_commit_write() returning %d\n",writtenlen?writtenlen:ret));
-	return writtenlen?writtenlen:ret;
+	D1(printk(KERN_DEBUG "jffs2_commit_write() returning %d\n",start+writtenlen==end?0:ret));
+	return start+writtenlen==end?0:ret;
 }





More information about the linux-mtd-cvs mailing list