From 662958b584e7e3dff7610ec79fe4f5b9aa9a4f21 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 20 Feb 2012 12:39:07 +0530 Subject: protocol/client: writev(): don't unwind if rpc_submit failed because rpc_submit does call 'cbk()' from inside if sending fails. no need to unwind in higher layers Change-Id: I08611ce742fba7032f68e3fe0f52a78a18a5714e Signed-off-by: Amar Tumballi BUG: 767359 Reviewed-on: http://review.gluster.com/2770 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client3_1-fops.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index f58d6a5e2..99a8d9e8b 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -3614,8 +3614,15 @@ client3_1_writev (call_frame_t *frame, xlator_t *this, void *data) client3_1_writev_cbk, args->vector, args->count, args->iobref, xdr_from_writev_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: -- cgit