changeset 94:5e9c63f92163

Patch from Todd Poyner (tpoynor@mvista.com) Return zero, not number of bytes written, for success (and non-zero for error) in the commit_write method. Some callers, notably the loopback mount driver, treat non-zero return as an error.
author marty <marty>
date Thu, 27 Oct 2005 07:22:49 +0000
parents 05d7dee4c19b
children 43bc1e9bab9d
files yaffs_fs.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -31,7 +31,7 @@
  */
 
 const char *yaffs_fs_c_version =
-    "$Id: yaffs_fs.c,v 1.31 2005-09-21 01:14:03 charles Exp $";
+    "$Id: yaffs_fs.c,v 1.32 2005-10-27 07:22:49 marty Exp $";
 extern const char *yaffs_guts_c_version;
 
 #include <linux/config.h>
@@ -604,9 +604,10 @@ static int yaffs_commit_write(struct fil
 	}
 
 	T(YAFFS_TRACE_OS,
-	  (KERN_DEBUG "yaffs_commit_write returning %d\n", nWritten));
+	  (KERN_DEBUG "yaffs_commit_write returning %d\n",
+	   nWritten == nBytes ? 0 : -1));
 
-	return nWritten;
+	return nWritten == nBytes ? 0 : -1;
 
 }