887953
From 253ad23a2cc9e177555ec692e537f760411a3517 Mon Sep 17 00:00:00 2001
887953
From: Susant Palai <spalai@redhat.com>
887953
Date: Wed, 20 Feb 2019 19:04:00 +0530
887953
Subject: [PATCH 532/532] dht: fix double extra unref of inode at heal path
887953
887953
The loc_wipe is done in the _out_ section, inode_unref(loc.parent) here
887953
casues a double extra unref of loc.parent.
887953
887953
> Change-Id: I2dc809328d3d34bf7b02c7df9a4f97788af511e6
887953
> updates: bz#1651439
887953
> Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
887953
(cherrypick of https://review.gluster.org/#/c/glusterfs/+/21998/)
887953
887953
Change-Id: I2e3b548fd283a02fff05d8485874203233affbe8
887953
BUG: 1678232
887953
Signed-off-by: Susant Palai <spalai@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/163382
887953
Tested-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
Tested-by: RHGS Build Bot <nigelb@redhat.com>
887953
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
---
887953
 xlators/cluster/dht/src/dht-helper.c | 2 +-
887953
 1 file changed, 1 insertion(+), 1 deletion(-)
887953
887953
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
887953
index d35d7e8..6a8b653 100644
887953
--- a/xlators/cluster/dht/src/dht-helper.c
887953
+++ b/xlators/cluster/dht/src/dht-helper.c
887953
@@ -1980,10 +1980,10 @@ dht_heal_path (xlator_t *this, char *path, inode_table_t *itable)
887953
                          */
887953
                         linked_inode = loc.inode;
887953
                         bname = strtok_r (NULL, "/",  &save_ptr);
887953
-                        inode_unref (loc.parent);
887953
                         if (!bname) {
887953
                                 goto out;
887953
                         }
887953
+                        inode_unref (loc.parent);
887953
                         loc.parent = loc.inode;
887953
                         gf_uuid_copy (loc.pargfid, loc.inode->gfid);
887953
                         loc.inode = NULL;
887953
-- 
887953
1.8.3.1
887953