diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-04-30 19:41:34 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-05-23 13:04:02 -0700 |
commit | df83bc05ff2c09fe5bd12ae32398bc58471d1f1a (patch) | |
tree | 3f2f5bac3cb53e638fce22f090bbf80bc11d5060 | |
parent | 3bee716c7a740c3cb6adececcea84bac0ba8abaa (diff) |
performance/io-cache: check the inode context to be NULL before accessingv3.4.0beta2
Change-Id: I475af7f8ffd5e5d8adbd2a74af20e56ad7751f69
BUG: 958108
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4916
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/5077
Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index a7459a9a378..30dc14a9cdb 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -551,6 +551,13 @@ ioc_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, inode_ctx_get (fd->inode, this, &tmp_ioc_inode); ioc_inode = (ioc_inode_t *)(long)tmp_ioc_inode; + //TODO: see why inode context is NULL and handle it. + if (!ioc_inode) { + gf_log (this->name, GF_LOG_ERROR, "inode context is " + "NULL (%s)", uuid_utoa (fd->inode->gfid)); + goto out; + } + ioc_table_lock (ioc_inode->table); { list_move_tail (&ioc_inode->inode_lru, |