aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-06-04 12:13:19 +0200
committerSverker Eriksson <[email protected]>2013-06-04 12:13:19 +0200
commited22252022f5627bee92c0c2e45450c875ad5868 (patch)
treeb169768a2ef70c73b32539130c664ec2ec899226 /erts
parent2e28220023dbcc5e0a8062ce289809ff1df17106 (diff)
parent1570d589c1ea8323baaa5b81b472a2a587c012e8 (diff)
downloadotp-ed22252022f5627bee92c0c2e45450c875ad5868.tar.gz
otp-ed22252022f5627bee92c0c2e45450c875ad5868.tar.bz2
otp-ed22252022f5627bee92c0c2e45450c875ad5868.zip
Merge branch 'sverk/pwrite-bug' into maint
* sverk/pwrite-bug: kernel: Fix bug in file:pwrite for large data sets
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/drivers/common/efile_drv.c4
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 */