diff options
| author | Raghavendra G <rgowdapp@redhat.com> | 2015-06-18 16:23:50 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2015-07-06 21:58:48 -0700 | 
| commit | 92d0f5b11c6059b3516c14fd6cfdf1e407ea017f (patch) | |
| tree | 922749f78b99129e84cbaa8c88d4618632278507 | |
| parent | 69c434432853e2ba1ee53296f05c6a54ab300d02 (diff) | |
cluster/dht: Fix Null pointer dereference while logging
Change-Id: I1ea358b83267b0bcdf654ce18fe881fd4a6bf08d
BUG: 1233158
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/11314
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
| -rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 16 | 
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 3275998df32..4fc77f886a6 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -996,6 +996,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, @@ -1006,14 +1014,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);  | 
