From 3e78ea991b213422fc423ff94994e1eb295569c7 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Thu, 15 Oct 2015 15:04:34 +0530 Subject: protocol: Remove lock recovery logic from client and server Change-Id: I27f5e1e34fe3eac96c7dd88e90753fb5d3d14550 BUG: 1272030 Signed-off-by: Anoop C S --- xlators/protocol/server/src/server-helpers.c | 44 ---------------------------- 1 file changed, 44 deletions(-) (limited to 'xlators/protocol/server/src/server-helpers.c') diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 7a58d2592ba..31eb2510cf8 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -1277,49 +1277,6 @@ gf_server_check_setxattr_cmd (call_frame_t *frame, dict_t *dict) return 0; } - -gf_boolean_t -server_cancel_grace_timer (xlator_t *this, client_t *client) -{ - server_ctx_t *serv_ctx = NULL; - gf_timer_t *timer = NULL; - gf_boolean_t cancelled = _gf_false; - - if (!this || !client) { - gf_msg (THIS->name, GF_LOG_ERROR, EINVAL, PS_MSG_INVALID_ENTRY, - "Invalid arguments to cancel connection timer"); - return cancelled; - } - - serv_ctx = server_ctx_get (client, client->this); - - if (serv_ctx == NULL) { - gf_msg (this->name, GF_LOG_INFO, 0, - PS_MSG_SERVER_CTX_GET_FAILED, - "server_ctx_get() failed"); - goto out; - } - - LOCK (&serv_ctx->fdtable_lock); - { - if (serv_ctx->grace_timer) { - gf_msg (this->name, GF_LOG_INFO, 0, - PS_MSG_GRACE_TIMER_CANCELLED, - "Cancelling the grace timer"); - timer = serv_ctx->grace_timer; - serv_ctx->grace_timer = NULL; - } - } - UNLOCK (&serv_ctx->fdtable_lock); - - if (timer) { - gf_timer_call_cancel (this->ctx, timer); - cancelled = _gf_true; - } -out: - return cancelled; -} - server_ctx_t* server_ctx_get (client_t *client, xlator_t *xlator) { @@ -1339,7 +1296,6 @@ server_ctx_get (client_t *client, xlator_t *xlator) if (ctx == NULL) goto out; - /* ctx->lk_version = 0; redundant */ ctx->fdtable = gf_fd_fdtable_alloc (); if (ctx->fdtable == NULL) { -- cgit