Mercurial > yaffs-ecoscentric-gpl
changeset 278:ba8a7124dc1f
Fix -ENOSPC to work properly with zero length writes
| author | charles <charles> |
|---|---|
| date | Tue, 12 May 2009 02:23:51 +0000 |
| parents | b55b92214eea |
| children | 2a2ec816e904 |
| files | yaffs_fs.c |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -32,7 +32,7 @@ */ const char *yaffs_fs_c_version = - "$Id: yaffs_fs.c,v 1.79 2009-03-17 01:12:00 wookey Exp $"; + "$Id: yaffs_fs.c,v 1.80 2009-05-12 02:23:51 charles Exp $"; extern const char *yaffs_guts_c_version; #include <linux/version.h> @@ -1075,7 +1075,7 @@ static ssize_t yaffs_file_write(struct f } yaffs_GrossUnlock(dev); - return nWritten == 0 ? -ENOSPC : nWritten; + return (nWritten == 0) && (n > 0) ? -ENOSPC : nWritten; } /* Space holding and freeing is done to ensure we have space available for write_begin/end */
