diff options
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r-- | libglusterfs/src/inode.c | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index b0c9abd980c..858f7e14d93 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -235,32 +235,8 @@ static void __inode_destroy (inode_t *inode) { int index = 0; - data_pair_t *pair = NULL; xlator_t *xl = NULL; - if (!inode->ctx) { - goto noctx; - } - for (pair = inode->ctx->members_list; pair; pair = pair->next) { - /* notify all xlators which have a context */ - xl = xlator_search_by_name (inode->table->xl, pair->key); - - if (!xl) { - gf_log (inode->table->name, GF_LOG_DEBUG, - "inode(%"PRId64")->ctx has invalid key(%s)", - inode->ino, pair->key); - continue; - } - - if (xl->cbks->forget) - xl->cbks->forget (xl, inode); - else - gf_log (inode->table->name, GF_LOG_DEBUG, - "xlator(%s) in inode(%"PRId64") no FORGET fop", - xl->name, inode->ino); - } - dict_destroy (inode->ctx); - if (!inode->_ctx) goto noctx; @@ -450,8 +426,6 @@ __inode_create (inode_table_t *table) newi->_ctx = CALLOC (1, (sizeof (struct _inode_ctx) * table->xl->ctx->xl_count)); - newi->ctx = get_new_dict (); - return newi; } @@ -859,6 +833,13 @@ inode_path (inode_t *inode, trav = __dentry_search_arbit (trav->parent)) { i ++; /* "/" */ i += strlen (trav->name); + if (i > PATH_MAX) { + gf_log ("inode", GF_LOG_CRITICAL, + "possible infinite loop detected, " + "forcing break. name=(%s)", name); + ret = -ENOENT; + goto unlock; + } } if ((inode->ino != 1) && |