From 51b26b20f0d02a103395989292a2f0f587131dee Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 31 Mar 2017 14:59:33 +0530 Subject: [PATCH 362/362] features/trash: Fix bad backport Commit 3fdcdc960f8479be6216cc3f53b1972724fa0724 is not backported from upstream patch https://review.gluster.org/16567 cleanly which caused mount to be hung. Fixed that part now. Label : DOWNSTREAM ONLY BUG: 1437782 Change-Id: I9fe7d8b61e96393080b49d4365f5e8ce3617c908 Signed-off-by: Pranith Kumar K Reviewed-on: https://code.engineering.redhat.com/gerrit/102100 Reviewed-by: Atin Mukherjee --- xlators/features/trash/src/trash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c index 0e8cf79..fd5507f 100644 --- a/xlators/features/trash/src/trash.c +++ b/xlators/features/trash/src/trash.c @@ -2170,8 +2170,9 @@ notify (xlator_t *this, int event, void *data, ...) goto out; } - if (!priv->state) { - gf_log (this->name, GF_LOG_DEBUG, "trash xlator is off"); + dict = dict_new (); + if (!dict) { + ret = ENOMEM; goto out; } priv->trash_itable = inode_table_new (0, this); @@ -2472,7 +2473,6 @@ init (xlator_t *this) goto out; } - priv->trash_itable = inode_table_new (0, this); gf_log (this->name, GF_LOG_DEBUG, "brick path is%s", priv->brick_path); this->private = (void *)priv; -- 1.8.3.1