OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a5c584
)
yaffs: Fix yaffs_file_write to not return -ENOSPC when there is nothing to write
author
Arve Hjønnevåg
<arve@android.com>
Thu, 7 May 2009 00:37:10 +0000
(17:37 -0700)
committer
Arve Hjønnevåg
<arve@android.com>
Fri, 8 May 2009 00:58:08 +0000
(17:58 -0700)
yaffs_write_end may get called with copied == 0 if the requested write was
interrupted by a signal, but user-space will not restart the write if -ENOSPC
is returned.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
fs/yaffs2/yaffs_fs.c
patch
|
blob
|
history
diff --git
a/fs/yaffs2/yaffs_fs.c
b/fs/yaffs2/yaffs_fs.c
index
30ae7c7
..
2288eee
100644
(file)
--- 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 == 0
? -ENOSPC : nWritten;
+ return
(!nWritten && n)
? -ENOSPC : nWritten;
}
/* Space holding and freeing is done to ensure we have space available for write_begin/end */