diff options
author | Anand Avati <avati@gluster.com> | 2010-01-23 07:02:35 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-01-23 04:47:26 -0800 |
commit | 6f15b21994e26925a587ab8965ab909abbfbeece (patch) | |
tree | 1f0b77090ace7dbbd09d21475144597d2b238bd6 | |
parent | 546168723f5b04a95aa1dab80679591335c5fc75 (diff) |
error-gen: unwind fsync with proper parameters
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 553 (server crashed in server_fsync_cbk)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=553
-rw-r--r-- | xlators/debug/error-gen/src/error-gen.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c index 8d97a46f16f..1df149a4ad8 100644 --- a/xlators/debug/error-gen/src/error-gen.c +++ b/xlators/debug/error-gen/src/error-gen.c @@ -1321,30 +1321,24 @@ error_gen_flush (call_frame_t *frame, return 0; } -int32_t -error_gen_fsync_cbk (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *prebuf, + +int +error_gen_fsync_cbk (call_frame_t *frame, void *cookie, + xlator_t *this, int32_t op_ret, + int32_t op_errno, struct stat *prebuf, struct stat *postbuf) { - STACK_UNWIND (frame, - op_ret, - op_errno); + STACK_UNWIND_STRICT (fsync, frame, op_ret, op_errno, prebuf, postbuf); return 0; } -int32_t -error_gen_fsync (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - int32_t flags) + +int +error_gen_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags) { - int op_errno = 0; + int op_errno = 0; eg_t *egp = NULL; - int enable = 1; + int enable = 1; egp = this->private; enable = egp->enable[ERR_FSYNC]; @@ -1354,16 +1348,14 @@ error_gen_fsync (call_frame_t *frame, if (op_errno) { GF_ERROR(this, "unwind(-1, %s)", strerror (op_errno)); - STACK_UNWIND (frame, -1, op_errno); + STACK_UNWIND_STRICT (fsync, frame, -1, op_errno, NULL, NULL); return 0; } - STACK_WIND (frame, - error_gen_fsync_cbk, + STACK_WIND (frame, error_gen_fsync_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->fsync, - fd, - flags); + fd, flags); return 0; } |