summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/stat-prefetch')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c3
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 7722c7bc8..ef2fc43b2 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -353,6 +353,7 @@ sp_cache_init (xlator_t *this)
}
LOCK_INIT (&cache->lock);
+ cache->this = this;
}
out:
@@ -383,7 +384,7 @@ sp_cache_remove_entry (sp_cache_t *cache, char *name, char remove_all)
goto out;
}
- this = THIS;
+ this = cache->this;
if (this == NULL)
goto out;
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.h b/xlators/performance/stat-prefetch/src/stat-prefetch.h
index 51942acd9..3fcf4a0a6 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.h
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.h
@@ -37,6 +37,7 @@
struct sp_cache {
rbthash_table_t *table;
+ xlator_t *this;
uint64_t expected_offset; /* Offset where the next read will
* happen.
*/