From d6e7ad2911ba8ae246c3a3ec62f04a712beca517 Mon Sep 17 00:00:00 2001 From: Kinglong Mee Date: Tue, 8 Jan 2019 16:38:45 +0800 Subject: 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 updates: bz#1651439 Signed-off-by: Kinglong Mee --- xlators/cluster/dht/src/dht-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') 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; -- cgit