diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 03cebdc518a..c41fb9385ad 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -9965,3 +9965,22 @@ glusterd_list_add_order (struct cds_list_head *new, struct cds_list_head *head,          cds_list_add_rcu (new, pos);  } + +void +gd_cleanup_local_xaction_peers_list (struct cds_list_head *xact_peers) +{ +        glusterd_local_peers_t *local_peers = NULL; +        glusterd_local_peers_t *tmp         = NULL; + +        GF_ASSERT (xact_peers); + +        if (cds_list_empty (xact_peers)) +                return; + +        cds_list_for_each_entry_safe (local_peers, tmp, xact_peers, +                                      op_peers_list) { +                GF_FREE (local_peers); +                /*  local_peers->peerinfo need not be freed because it does not +                 *  ownership of peerinfo, but merely refer it */ +        } +}  | 
