diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-04-30 19:41:34 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-01 09:54:10 -0700 |
commit | b6e10801bee030fe7fcd1ec3bfac947ce44d023d (patch) | |
tree | f6e14ee9da928acc6c0edc8de567e13286652b32 /xlators/performance/io-cache/src/io-cache.c | |
parent | 39a1eaf38d64f66dfa74c6843dc9266f40dd4645 (diff) |
performance/io-cache: check the inode context to be NULL before accessing
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>
Diffstat (limited to 'xlators/performance/io-cache/src/io-cache.c')
-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, |