From 4235868f0ded7aeb157aef05f10d2df4a470a2c5 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Sun, 6 Dec 2009 04:42:01 +0000 Subject: performance/stat-prefetch: remove the usage of THIS. Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221 --- xlators/performance/stat-prefetch/src/stat-prefetch.c | 3 ++- xlators/performance/stat-prefetch/src/stat-prefetch.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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. */ -- cgit