File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1358,6 +1358,7 @@ struct readahead_control {
1358
1358
pgoff_t _index ;
1359
1359
unsigned int _nr_pages ;
1360
1360
unsigned int _batch_count ;
1361
+ bool dropbehind ;
1361
1362
bool _workingset ;
1362
1363
unsigned long _pflags ;
1363
1364
};
Original file line number Diff line number Diff line change @@ -181,7 +181,13 @@ static void read_pages(struct readahead_control *rac)
181
181
static struct folio * ractl_alloc_folio (struct readahead_control * ractl ,
182
182
gfp_t gfp_mask , unsigned int order )
183
183
{
184
- return filemap_alloc_folio (gfp_mask , order );
184
+ struct folio * folio ;
185
+
186
+ folio = filemap_alloc_folio (gfp_mask , order );
187
+ if (folio && ractl -> dropbehind )
188
+ __folio_set_dropbehind (folio );
189
+
190
+ return folio ;
185
191
}
186
192
187
193
/**
You can’t perform that action at this time.
0 commit comments