PFS: when copy fails, don't change state

. makes it safe to transparently repeate i/o operation on
	  EFAULT
	. needed for future re-issued i/o operation change in VFS

Change-Id: Iea6b29f3bff19002dcd69b30569671768ac17e21
This commit is contained in:
Ben Gras 2014-02-26 15:57:08 +01:00 committed by Lionel Sambuc
parent fa901649a3
commit 8c277f99f4

View file

@ -74,7 +74,6 @@ int fs_readwrite(message *fs_m_in, message *fs_m_out)
if (r == OK) {
position += (signed) nrbytes; /* Update position */
cum_io += nrbytes;
}
/* On write, update file size and access time. */
if (rw_flag == WRITING) {
@ -86,6 +85,8 @@ int fs_readwrite(message *fs_m_in, message *fs_m_out)
if (rw_flag == READING) rip->i_update |= ATIME;
if (rw_flag == WRITING) rip->i_update |= CTIME | MTIME;
}
fs_m_out->RES_NBYTES = (size_t) cum_io;
fs_m_out->RES_SEEK_POS = rip->i_size;