summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 7717e3d72..b99c91bce 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);
}