summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index abfc6175617..9c6f44f0de8 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -934,10 +934,7 @@ sp_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
cache = sp_get_cache_fd (this, fd);
if (cache) {
if (off != cache->expected_offset) {
- cache = sp_del_cache_fd (this, fd);
- if (cache) {
- sp_cache_free (cache);
- }
+ sp_cache_remove_entry (cache, NULL, 1);
}
}
@@ -945,7 +942,7 @@ sp_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
if (ret == -1) {
goto unwind;
}
-
+
ret = sp_cache_remove_parent_entry (frame, this, path);
FREE (path);