diff options
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/legacy/server/src/server-helpers.c | 27 | ||||
-rw-r--r-- | xlators/protocol/legacy/server/src/server-helpers.h | 4 | ||||
-rw-r--r-- | xlators/protocol/legacy/server/src/server-protocol.c | 3 |
3 files changed, 13 insertions, 21 deletions
diff --git a/xlators/protocol/legacy/server/src/server-helpers.c b/xlators/protocol/legacy/server/src/server-helpers.c index 595916a3656..79104752ff1 100644 --- a/xlators/protocol/legacy/server/src/server-helpers.c +++ b/xlators/protocol/legacy/server/src/server-helpers.c @@ -28,7 +28,7 @@ void -server_loc_wipe (loc_t *loc) +old_server_loc_wipe (loc_t *loc) { if (loc->parent) { inode_unref (loc->parent); @@ -45,8 +45,8 @@ server_loc_wipe (loc_t *loc) } -void -server_resolve_wipe (server_resolve_t *resolve) +static void +old_server_resolve_wipe (server_resolve_t *resolve) { struct resolve_comp *comp = NULL; int i = 0; @@ -74,7 +74,7 @@ server_resolve_wipe (server_resolve_t *resolve) void -free_server_state (server_state_t *state) +free_old_server_state (server_state_t *state) { if (state->trans) { transport_unref (state->trans); @@ -107,11 +107,11 @@ free_server_state (server_state_t *state) if (state->name) GF_FREE (state->name); - server_loc_wipe (&state->loc); - server_loc_wipe (&state->loc2); + old_server_loc_wipe (&state->loc); + old_server_loc_wipe (&state->loc2); - server_resolve_wipe (&state->resolve); - server_resolve_wipe (&state->resolve2); + old_server_resolve_wipe (&state->resolve); + old_server_resolve_wipe (&state->resolve2); GF_FREE (state); } @@ -145,7 +145,7 @@ gf_server_nop_cbk (call_frame_t *frame, void *cookie, xlator_t *this, state = CALL_STATE(frame); if (state) - free_state (state); + free_old_server_state (state); STACK_DESTROY (frame->root); return 0; } @@ -317,7 +317,6 @@ do_connection_cleanup (xlator_t *this, server_connection_t *conn, int ret = 0; int saved_ret = 0; call_frame_t *frame = NULL; - server_state_t *state = NULL; frame = create_frame (this, this->ctx->pool); if (frame == NULL) { @@ -331,10 +330,6 @@ do_connection_cleanup (xlator_t *this, server_connection_t *conn, ret = do_fd_cleanup (this, conn, frame, fdentries, fd_count); } - state = CALL_STATE (frame); - if (state) - GF_FREE (state); - STACK_DESTROY (frame->root); if (saved_ret || ret) { @@ -391,7 +386,6 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn) call_frame_t *frame = NULL, *tmp_frame = NULL; xlator_t *bound_xl = NULL; int32_t ret = -1; - server_state_t *state = NULL; struct list_head file_lockers; struct list_head dir_lockers; struct _lock_table *ltable = NULL; @@ -537,9 +531,6 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn) } if (frame) { - state = CALL_STATE (frame); - if (state) - GF_FREE (state); STACK_DESTROY (frame->root); } diff --git a/xlators/protocol/legacy/server/src/server-helpers.h b/xlators/protocol/legacy/server/src/server-helpers.h index 137b2e9c2c3..d22b3211264 100644 --- a/xlators/protocol/legacy/server/src/server-helpers.h +++ b/xlators/protocol/legacy/server/src/server-helpers.h @@ -41,8 +41,8 @@ #define IS_NOT_ROOT(pathlen) ((pathlen > 2)? 1 : 0) -void free_state (server_state_t *state); +void free_old_server_state (server_state_t *state); -void server_loc_wipe (loc_t *loc); +void old_server_loc_wipe (loc_t *loc); #endif /* __SERVER_HELPERS_H__ */ diff --git a/xlators/protocol/legacy/server/src/server-protocol.c b/xlators/protocol/legacy/server/src/server-protocol.c index 5193e54b1f5..35d58ae99cd 100644 --- a/xlators/protocol/legacy/server/src/server-protocol.c +++ b/xlators/protocol/legacy/server/src/server-protocol.c @@ -342,7 +342,7 @@ protocol_server_reply (call_frame_t *frame, int type, int op, STACK_DESTROY (frame->root); if (state) - free_state (state); + free_old_server_state (state); } @@ -6489,6 +6489,7 @@ notify (xlator_t *this, int32_t event, void *data, ...) peer_info_t *peerinfo = NULL; peer_info_t *myinfo = NULL; + THIS = this; trans = data; if (!trans) { gf_log (this->name, GF_LOG_ERROR, "!trans"); |