diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2016-05-04 20:16:36 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-05-05 23:48:06 -0700 |
commit | ef14971b36aa7c41bcfc13620bceecf97f508c57 (patch) | |
tree | f518b700080fb59272bc6dee043794b0047cb0ae /xlators/cluster/dht/src | |
parent | 3ebcdf6274867e875f299c81e6fe833d7571190f (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: I443322d26f2b5238320bc14f1ddc94affe030943
BUG: 1333241
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14216
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>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 2 |
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 b21a4d55464..87b3eee4d58 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -7208,7 +7208,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, |