diff options
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 3 | ||||
-rw-r--r-- | xlators/features/changelog/src/changelog.c | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index fdec66340ba..998e9045b97 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1909,7 +1909,8 @@ afr_selfheal_unlocked_discover(call_frame_t *frame, inode_t *inode, uuid_t gfid, dict_t *dict = NULL; local = frame->local; - if (local && local->xattr_req) + + if (local->xattr_req) dict = local->xattr_req; return afr_selfheal_unlocked_discover_on(frame, inode, gfid, replies, diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c index 37916f40882..9a7d158cbf2 100644 --- a/xlators/features/changelog/src/changelog.c +++ b/xlators/features/changelog/src/changelog.c @@ -2036,20 +2036,20 @@ notify(xlator_t *this, int event, void *data, ...) priv->notify_down = _gf_true; } UNLOCK(&priv->lock); - list_for_each_entry_safe(listener, next, &priv->rpc->listeners, - list) - { - if (listener->trans) { - rpc_transport_unref(listener->trans); + if (priv->rpc) { + list_for_each_entry_safe(listener, next, + &priv->rpc->listeners, list) + { + if (listener->trans) { + rpc_transport_unref(listener->trans); + } } + rpcsvc_destroy(priv->rpc); + priv->rpc = NULL; } CHANGELOG_MAKE_SOCKET_PATH(priv->changelog_brick, sockfile, UNIX_PATH_MAX); sys_unlink(sockfile); - if (priv->rpc) { - rpcsvc_destroy(priv->rpc); - priv->rpc = NULL; - } if (!cleanup_notify) default_notify(this, GF_EVENT_PARENT_DOWN, data); } |