diff options
author | Sverker Eriksson <[email protected]> | 2015-04-15 20:29:08 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-04-15 20:29:08 +0200 |
commit | c46ae84ffd858c8fa8ddb3bfbfb3607276173fb4 (patch) | |
tree | 76f2f9ab72eaf12c5e7c76c9549f367f95d28160 | |
parent | 94373d3c32106bfbb4e743876c8ee7117277a907 (diff) | |
parent | 7f6e9ab38d14cba1386cb91307258302702617b8 (diff) | |
download | otp-c46ae84ffd858c8fa8ddb3bfbfb3607276173fb4.tar.gz otp-c46ae84ffd858c8fa8ddb3bfbfb3607276173fb4.tar.bz2 otp-c46ae84ffd858c8fa8ddb3bfbfb3607276173fb4.zip |
Merge branch 'sverk/nlmills-pr653/efile-union-pwritev/OTP-12653'
* sverk/nlmills-pr653/efile-union-pwritev/OTP-12653:
erts: Cleanup code in invoke_pwritev
Use the correct union member inside efile_drv
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 3b8e7acb6e..518646649d 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -1616,12 +1616,12 @@ static void invoke_altname(void *data) } static void invoke_pwritev(void *data) { - struct t_data *d = (struct t_data *) data; + struct t_data* const d = (struct t_data *) data; + struct t_pwritev * const c = &d->c.pwritev; SysIOVec *iov0; SysIOVec *iov; int iovlen; int iovcnt; - struct t_pwritev *c = &d->c.pwritev; size_t p; int segment; size_t size, write_size, written; @@ -1695,9 +1695,9 @@ static void invoke_pwritev(void *data) { d->result_ok = 0; d->again = 0; deq_error: - MUTEX_LOCK(d->c.writev.q_mtx); - driver_deq(d->c.pwritev.port, c->size); - MUTEX_UNLOCK(d->c.writev.q_mtx); + MUTEX_LOCK(c->q_mtx); + driver_deq(c->port, c->size); + MUTEX_UNLOCK(c->q_mtx); goto done; } else { @@ -1708,9 +1708,9 @@ static void invoke_pwritev(void *data) { ASSERT(written >= FILE_SEGMENT_WRITE); } - MUTEX_LOCK(d->c.writev.q_mtx); - driver_deq(d->c.pwritev.port, written); - MUTEX_UNLOCK(d->c.writev.q_mtx); + MUTEX_LOCK(c->q_mtx); + driver_deq(c->port, written); + MUTEX_UNLOCK(c->q_mtx); done: EF_FREE(iov); /* Free our copy of the vector, nothing to restore */ |