diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-10-27 03:07:29 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-27 02:57:12 -0700 |
commit | 38c91384861f29f97c3f564a36ee799f1eb57cc1 (patch) | |
tree | 41125daa10a476d44b371eb773569c9b52769329 /xlators/mgmt/glusterd/src/glusterd3_1-mops.c | |
parent | c02cd37866ae22e3a433d737f3c80395bb72f002 (diff) |
mgmt/glusterd: Unlock upon a cli request failure
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1873 (Stop volume gluster command execution failed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1873
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd3_1-mops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd3_1-mops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c index b8abebf06ca..8e9c0806fcb 100644 --- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c +++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c @@ -1357,6 +1357,7 @@ glusterd_handle_rpc_msg (rpcsvc_request_t *req) int ret = -1; gf_boolean_t is_cli_req = _gf_false; char *op_errstr = NULL; + int lock_fail = 0; GF_ASSERT (req); @@ -1368,6 +1369,7 @@ glusterd_handle_rpc_msg (rpcsvc_request_t *req) if (ret) { gf_log ("", GF_LOG_ERROR, "Unable to set cli op: %d", ret); + lock_fail = 1; goto out; } } @@ -1496,6 +1498,8 @@ out: be 0, and we should not point to any RPC errors, because otherwise rpcsvc.c will send an error reply for the same request, which causes double replies */ + if (!lock_fail) + (void) glusterd_opinfo_unlock (); ret = glusterd_op_send_cli_response (req->procnum, ret, 0, req, NULL, op_errstr); } if (op_errstr && (strcmp (op_errstr, ""))) |