summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2019-01-08 16:38:45 +0800
committerShyamsundar Ranganathan <srangana@redhat.com>2019-02-22 03:34:06 +0000
commit5c9b2dfb4d251cc0201759c495bbd4d1ad5e3c87 (patch)
treefcb96af9bf27c8eb5079b6aafe853f155fb9d970 /xlators/cluster/dht
parentbff265f8bc12eb43e82732b6ae81abf18a4b7a97 (diff)
dht: fix double extra unref of inode at heal path
The loc_wipe is done in the _out_ section, inode_unref(loc.parent) here casues a double extra unref of loc.parent. > Change-Id: I2dc809328d3d34bf7b02c7df9a4f97788af511e6 > Signed-off-by: Kinglong Mee <mijinlong@open-fs.com> (cherry-pick of https://review.gluster.org/#/c/glusterfs/+/21998/) Change-Id: I2dc809328d3d34bf7b02c7df9a4f97788af511e6 updates: bz#1679275 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 1a5ba256ffd..4c57e0d2efc 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -1919,10 +1919,10 @@ dht_heal_path(xlator_t *this, char *path, inode_table_t *itable)
*/
linked_inode = loc.inode;
bname = strtok_r(NULL, "/", &save_ptr);
- inode_unref(loc.parent);
if (!bname) {
goto out;
}
+ inode_unref(loc.parent);
loc.parent = loc.inode;
gf_uuid_copy(loc.pargfid, loc.inode->gfid);
loc.inode = NULL;