diff options
author | Sverker Eriksson <[email protected]> | 2013-05-30 19:28:38 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-05-31 12:07:03 +0200 |
commit | 1570d589c1ea8323baaa5b81b472a2a587c012e8 (patch) | |
tree | 54b949bbf4fab528e4aab25d45928118f2c27486 | |
parent | e794251f8e54d6697e1bcc360471fd76b20c7748 (diff) | |
download | otp-1570d589c1ea8323baaa5b81b472a2a587c012e8.tar.gz otp-1570d589c1ea8323baaa5b81b472a2a587c012e8.tar.bz2 otp-1570d589c1ea8323baaa5b81b472a2a587c012e8.zip |
kernel: Fix bug in file:pwrite for large data sets
Bug introduced in a73414d2e8ad03538 and never released.
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 6cc1295973..595b0488a8 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -1679,10 +1679,10 @@ static void invoke_pwritev(void *data) { d->again = 0; } } else - ASSERT(written == FILE_SEGMENT_WRITE); + ASSERT(written >= FILE_SEGMENT_WRITE); MUTEX_LOCK(d->c.writev.q_mtx); - driver_deq(d->c.pwritev.port, size); + driver_deq(d->c.pwritev.port, written); MUTEX_UNLOCK(d->c.writev.q_mtx); done: EF_FREE(iov); /* Free our copy of the vector, nothing to restore */ |