summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/performance/io-cache/src/io-cache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 296edf23303..7de7640de64 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -181,7 +181,7 @@ ioc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *stbuf, dict_t *dict, struct iatt *postparent)
{
ioc_inode_t *ioc_inode = NULL;
- ioc_table_t *table = this->private;
+ ioc_table_t *table = NULL;
uint8_t cache_still_valid = 0;
uint64_t tmp_ioc_inode = 0;
uint32_t weight = 0xffffffff;
@@ -198,6 +198,11 @@ ioc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
}
+ if (!this || !this->private)
+ goto out;
+
+ table = this->private;
+
path = local->file_loc.path;
LOCK (&inode->lock);