Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fc67fbe authored by Todd Poynor's avatar Todd Poynor Committed by Thomas Gleixner
Browse files

[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: default avatarTodd Poynor <tpoynor@mvista.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent fb025873
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -7,7 +7,7 @@
 *
 *
 * For licensing information, see the file 'LICENCE' in this directory.
 * For licensing information, see the file 'LICENCE' in this directory.
 *
 *
 * $Id: file.c,v 1.103 2005/09/07 08:34:54 havasi Exp $
 * $Id: file.c,v 1.104 2005/10/18 23:29:35 tpoynor Exp $
 *
 *
 */
 */


@@ -279,6 +279,6 @@ static int jffs2_commit_write (struct file *filp, struct page *pg,
		ClearPageUptodate(pg);
		ClearPageUptodate(pg);
	}
	}


	D1(printk(KERN_DEBUG "jffs2_commit_write() returning %d\n",writtenlen?writtenlen:ret));
	D1(printk(KERN_DEBUG "jffs2_commit_write() returning %d\n",start+writtenlen==end?0:ret));
	return writtenlen?writtenlen:ret;
	return start+writtenlen==end?0:ret;
}
}