summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-11-16 10:33:30 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-12-07 06:03:53 -0800
commit2173267f4a646ad2edef20a7791719168a9039c7 (patch)
treed3b7cc6771432c49de16c1ee574a95e183d237b1 /xlators
parent00aa042e6183ef3cb5386f587c2481cd978d9dcf (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> (cherry picked from commit 8313d53accaa22feb14d284fb91245be0a32e16e) Change-Id: Id8c7bfe181bb40a02cd49b0f5fc3b45cabf5afa6 BUG: 1395517 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/15851 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators')
-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 3b31c44dd27..29061b8f0de 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -711,8 +711,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);