diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2011-12-13 17:13:59 -0500 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-12-19 21:40:32 -0800 |
commit | 2a3e74e7a68aac1ad6d89122bbc4d64cd304986b (patch) | |
tree | 8a354f8c43c269d5bc4b09ca296dead387ffdce2 | |
parent | 255fed3b0d5b9d210d1da47dbd647dd6497cd550 (diff) |
Fix local==NULL crash in wb_sync_cbk during disconnect.
Change-Id: I26dc48a85756e189b1ef5cfef1658f9c2aed2157
BUG: 767359
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/784
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 98d19c701e8..9b0fd63cc68 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -3623,12 +3623,19 @@ client3_1_writev (call_frame_t *frame, xlator_t *this, void *data) client3_1_writev_cbk, args->vector, args->count, args->iobref, (xdrproc_t)xdr_gfs3_write_req); - if (ret) - goto unwind; + if (ret) { + /* + * If the lower layers fail to submit a request, they'll also + * do the unwind for us (see rpc_clnt_submit), so don't unwind + * here in such cases. + */ + gf_log (this->name, GF_LOG_WARNING, + "failed to send the fop: %s", strerror (op_errno)); + } return 0; + unwind: - gf_log (this->name, GF_LOG_WARNING, "failed to send the fop: %s", strerror (op_errno)); STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL); return 0; } |