summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2015-06-18 16:23:50 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-18 22:16:19 -0700
commitdda7608736857ac5fb539f2c04a1499999c984ed (patch)
treecea192529983e4f282fa4ab30513a98ba6e73e7e /xlators/cluster/dht/src/dht-helper.c
parent81972918a0b0252cfa7feefbb80182fa886a72f8 (diff)
cluster/dht: Fix Null pointer dereference while logging
Change-Id: I1ea358b83267b0bcdf654ce18fe881fd4a6bf08d BUG: 1233139 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/11313 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 24c316478aa..dfc219b6654 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -969,6 +969,14 @@ dht_migration_complete_check_task (void *data)
goto out;
}
+ dst_node = dht_subvol_get_cached (this, tmp_loc.inode);
+ if (linkto_target && dst_node != linkto_target) {
+ gf_log (this->name, GF_LOG_WARNING, "linkto target (%s) is "
+ "different from cached-subvol (%s). Treating %s as "
+ "destination subvol", linkto_target->name,
+ dst_node->name, dst_node->name);
+ }
+
if (gf_uuid_compare (stbuf.ia_gfid, tmp_loc.inode->gfid)) {
gf_msg (this->name, GF_LOG_ERROR, 0,
DHT_MSG_GFID_MISMATCH,
@@ -979,14 +987,6 @@ dht_migration_complete_check_task (void *data)
goto out;
}
- dst_node = dht_subvol_get_cached (this, tmp_loc.inode);
- if (linkto_target && dst_node != linkto_target) {
- gf_log (this->name, GF_LOG_WARNING, "linkto target (%s) is "
- "different from cached-subvol (%s). Treating %s as "
- "destination subvol", linkto_target->name,
- dst_node->name, dst_node->name);
- }
-
/* update local. A layout is set in inode-ctx in lookup already */
dht_layout_unref (this, local->layout);