--- libeio/eio.c 2009/04/22 11:04:49 1.29 +++ libeio/eio.c 2009/06/03 12:24:49 1.30 @@ -773,7 +773,7 @@ ooffset = lseek (fd, 0, SEEK_CUR); lseek (fd, offset, SEEK_SET); res = write (fd, buf, count); - lseek (fd, offset, SEEK_SET); + lseek (fd, ooffset, SEEK_SET); X_UNLOCK (preadwritelock); return res;