summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorPranith Kumar <pkarampu@redhat.com>2017-11-02 16:19:17 +0530
committerAmar Tumballi <amarts@redhat.com>2017-11-17 10:19:08 +0530
commitdd80e9e33bc42d11c6cba375bca2ee9a2db9776c (patch)
tree87059156bf5676e820da9c294fe423ad583c0a40 /xlators/features
parent336e2d5350012829e08cc55c25a76fb426e888a0 (diff)
features/index: initialize the options properly
watchlists should not over-write values gathered in previous invocation. Change-Id: I5634930d20e720ad6509b03a64360d7320800565 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/index/src/index.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 12f98974fc3..619de37c13b 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -2239,15 +2239,24 @@ index_make_xattrop_watchlist (xlator_t *this, index_priv_t *priv,
switch (type) {
case DIRTY:
- priv->dirty_watchlist = xattrs;
+ priv->dirty_watchlist = dict_copy_with_ref (xattrs,
+ priv->dirty_watchlist);
+ if (!priv->dirty_watchlist) {
+ ret = -1;
+ goto out;
+ }
break;
case XATTROP:
- priv->pending_watchlist = xattrs;
+ priv->pending_watchlist = dict_copy_with_ref (xattrs,
+ priv->pending_watchlist);
+ if (!priv->pending_watchlist) {
+ ret = -1;
+ goto out;
+ }
break;
default:
break;
}
- xattrs = NULL;
ret = 0;
out: