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>
This commit is contained in:
parent
39a1eaf38d
commit
b6e10801be
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user