summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-11-15 20:40:08 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-11-15 19:42:33 -0800
commit8313d53accaa22feb14d284fb91245be0a32e16e (patch)
treef6ed925d7b32f6c2317545abaebfeb6f9ac8a909 /xlators/cluster/dht
parent8437b24de36d322d26f707890f25392a098de30e (diff)
cluster/dht: Check for null inode
Check for NULL inode before attempting to set dht inode ctx. Change-Id: I7693c18445f138221d8417df5e95b118cedb818a BUG: 1395261 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/15847 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 01d83bb3074..ab3b893d151 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -899,8 +899,11 @@ unlock:
dht_layout_set (this, local->inode, layout);
}
- dht_inode_ctx_time_update (local->inode, this,
- &local->stbuf, 1);
+ if (local->inode) {
+ dht_inode_ctx_time_update (local->inode, this,
+ &local->stbuf, 1);
+ }
+
if (local->loc.parent) {
dht_inode_ctx_time_update (local->loc.parent, this,
&local->postparent, 1);