From 2c3912086af7c5441d09cc9e2f4fdc52c7d86275 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sat, 30 Jul 2011 22:45:13 +0800 Subject: [PATCH] Revert "yaffs: Fix yaffs_file_write to not return -ENOSPC when there is nothing to write" This reverts commit 567940aa0a576440a6f64b8bb2517c378f6b6886. --- fs/yaffs2/yaffs_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c index 2288eeee2d77..30ae7c7e259a 100644 --- a/fs/yaffs2/yaffs_fs.c +++ b/fs/yaffs2/yaffs_fs.c @@ -1075,7 +1075,7 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, } yaffs_GrossUnlock(dev); - return (!nWritten && n) ? -ENOSPC : nWritten; + return nWritten == 0 ? -ENOSPC : nWritten; } /* Space holding and freeing is done to ensure we have space available for write_begin/end */ -- 2.34.1