diff options
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r-- | libglusterfs/src/xlator.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 01cb27896ee..b305ad50e5d 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -1051,6 +1051,7 @@ xlator_mem_cleanup(xlator_t *this) top = ctx->active->first; LOCK(&ctx->volfile_lock); /* TODO here we have leak for xlator node in a graph */ + /* Need to move only top xlator from a graph */ for (trav_p = &top->children; *trav_p; trav_p = &(*trav_p)->next) { victim = (*trav_p)->xlator; if (victim->call_cleanup && !strcmp(victim->name, this->name)) { @@ -1058,19 +1059,6 @@ xlator_mem_cleanup(xlator_t *this) break; } } - /* TODO Sometime brick xlator is not moved from graph so followed below - approach to move brick xlator from a graph, will move specific brick - xlator from graph only while inode table and mem_acct are cleaned up - */ - trav_p = &top->children; - while (*trav_p) { - victim = (*trav_p)->xlator; - if (victim->call_cleanup && !victim->itable && !victim->mem_acct) { - (*trav_p) = (*trav_p)->next; - } else { - trav_p = &(*trav_p)->next; - } - } UNLOCK(&ctx->volfile_lock); } } |