summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-05-04 20:16:36 +0530
committerNiels de Vos <ndevos@redhat.com>2016-05-06 07:15:02 -0700
commit036dcd39bfa40473073d45c10a0daec63fbca2ab (patch)
treeaa0f954680a5ac983ddc58bbc132f4df0f4ff1d4
parenta6614f7fa917b2f3e518338c560edb4115b99b30 (diff)
cluster/dht: Perform NULL check on xdata before dict_get()
Backport of: http://review.gluster.org/14212 .. to prevent unnecessary logs from gf_msg_callingfn() Change-Id: Ic2f21532f09af3ab7d36ce5f20c561fff5208fbb BUG: 1333244 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14218 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 01b6123d1b3..4f006b97919 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -7206,7 +7206,7 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
if (op_ret == -1) {
local->op_errno = op_errno;
- parent_layout_changed = dict_get (xdata, GF_PREOP_CHECK_FAILED)
+ parent_layout_changed = (xdata && dict_get (xdata, GF_PREOP_CHECK_FAILED))
? 1 : 0;
if (parent_layout_changed) {
gf_msg (this->name, GF_LOG_INFO, 0,