diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-12-06 04:42:01 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-06 02:30:24 -0800 |
commit | 4235868f0ded7aeb157aef05f10d2df4a470a2c5 (patch) | |
tree | 89aeda579a4faf9c6d8b15a7ba101f1c41e548ba /xlators/performance | |
parent | bf23224e5dc2af09efd0888490f7af191052c874 (diff) |
performance/stat-prefetch: remove the usage of THIS.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 221 (stat prefetch implementation)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 3 | ||||
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.h | 1 |
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 7722c7bc8b3..ef2fc43b239 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 51942acd960..3fcf4a0a63e 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. */ |