From 2a3e74e7a68aac1ad6d89122bbc4d64cd304986b Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Tue, 13 Dec 2011 17:13:59 -0500 Subject: Fix local==NULL crash in wb_sync_cbk during disconnect. Change-Id: I26dc48a85756e189b1ef5cfef1658f9c2aed2157 BUG: 767359 Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.com/784 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client3_1-fops.c | 13 ++++++++++--- 1 file 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; } -- cgit