summaryrefslogtreecommitdiffstats
path: root/xlators/performance/read-ahead/src/read-ahead.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/read-ahead/src/read-ahead.c')
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index f7f16115b93..718bf3398dd 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -248,8 +248,12 @@ flush_region (call_frame_t *frame, ra_file_t *file, off_t offset, off_t size,
if (!trav->waitq) {
ra_page_purge (trav);
}
- else if (for_write) {
- trav->poisoned = 1;
+ else {
+ trav->stale = 1;
+
+ if (for_write) {
+ trav->poisoned = 1;
+ }
}
}
trav = next;