aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/file.c
diff options
context:
space:
mode:
authorTodd Poynor <tpoynor@mvista.com>2005-10-18 19:29:38 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 17:14:16 -0500
commit4fc67fbe52d7c34dfd3e03a1a79f3e078904bba2 (patch)
tree34c23c384bd19123afdad8495927afd400a2b5db /fs/jffs2/file.c
parentfb0258730ad554db531f12fc1c3d5a5234fe52a4 (diff)
[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@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/file.c')
-rw-r--r--fs/jffs2/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index 231404a74728..605ea6b0b473 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: file.c,v 1.103 2005/09/07 08:34:54 havasi Exp $ 10 * $Id: file.c,v 1.104 2005/10/18 23:29:35 tpoynor Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -279,6 +279,6 @@ static int jffs2_commit_write (struct file *filp, struct page *pg,
279 ClearPageUptodate(pg); 279 ClearPageUptodate(pg);
280 } 280 }
281 281
282 D1(printk(KERN_DEBUG "jffs2_commit_write() returning %d\n",writtenlen?writtenlen:ret)); 282 D1(printk(KERN_DEBUG "jffs2_commit_write() returning %d\n",start+writtenlen==end?0:ret));
283 return writtenlen?writtenlen:ret; 283 return start+writtenlen==end?0:ret;
284} 284}