diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2019-08-28 11:55:17 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-08-30 04:41:24 +0000 |
commit | a498c478109395e7baa9b029c81d5587254bdd89 (patch) | |
tree | 2f594a6a8069c8bb58b188b06be61157a49bfc37 | |
parent | 7273602b8b88229f182e29a1b977b80b02cb0624 (diff) |
debug/error-gen: Set count correctly for short-writes
vector count is reduced to 1 but it is not reflected at the time of
winding the call. This leads to crash when short-writes are done
using error-gen. Set the correct count to fix the problem.
fixes: bz#1746320
Change-Id: I037b60b7e321f2f50b71fb52c43c64707cf114ca
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r-- | xlators/debug/error-gen/src/error-gen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c index 8901e349e6f..ff993f7b5e5 100644 --- a/xlators/debug/error-gen/src/error-gen.c +++ b/xlators/debug/error-gen/src/error-gen.c @@ -761,6 +761,7 @@ error_gen_writev(call_frame_t *frame, xlator_t *this, fd_t *fd, */ shortvec = iov_dup(vector, 1); shortvec->iov_len /= 2; + count = 1; goto wind; } else if (op_errno) { GF_ERROR(this, "unwind(-1, %s)", strerror(op_errno)); |