diff options
author | N Balachandran <nbalacha@redhat.com> | 2016-11-16 10:09:09 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2017-01-02 05:04:39 -0800 |
commit | d5ccb525d3c865ea5eba9f7b79b76bc1db76906f (patch) | |
tree | 1c1770d6da0fc454f6cf087c52eecf75bca4b6af | |
parent | 1a0e9f942d9c696195fc948326efb147d791a454 (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: I7607d32d38d707dd5d71b98efffd1a458ffe90d7
BUG: 1395510
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/15850
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 7 |
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 90db73f1f72..0ce93e3d112 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -898,8 +898,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); |