summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-helpers.c
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2015-10-15 15:04:34 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-01-29 17:36:31 +0000
commit3e78ea991b213422fc423ff94994e1eb295569c7 (patch)
tree4eb9bfc9e9a60a816a59d1e0215ee560e30f118a /xlators/protocol/server/src/server-helpers.c
parent596143a286079338c30c8abc4b862f8d6ddddb3a (diff)
protocol: Remove lock recovery logic from client and server
Change-Id: I27f5e1e34fe3eac96c7dd88e90753fb5d3d14550 BUG: 1272030 Signed-off-by: Anoop C S <anoopcs@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
-rw-r--r--xlators/protocol/server/src/server-helpers.c44
1 files changed, 0 insertions, 44 deletions
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) {