summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/io-cache/src/page.c3
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c
index b50b245ac0b..0721f5f04a3 100644
--- a/xlators/performance/io-cache/src/page.c
+++ b/xlators/performance/io-cache/src/page.c
@@ -85,7 +85,8 @@ ioc_page_destroy (ioc_page_t *page)
GF_VALIDATE_OR_GOTO ("io-cache", page, out);
- page_size = iobref_size (page->iobref);
+ if (page->iobref)
+ page_size = iobref_size (page->iobref);
if (page->waitq) {
/* frames waiting on this page, do not destroy this page */
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 7717e3d727c..b99c91bce64 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -894,7 +894,8 @@ sp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
}
- if (op_ret == -1) {
+ /* For '/' Entry is never cached, don't try to remove it */
+ if ((op_ret == -1) && local->loc.parent) {
sp_remove_caches_from_all_fds_opened (this, local->loc.parent,
(char *)local->loc.name);
}