File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,7 @@ void page_cache_ra_order(struct readahead_control *ractl,
490
490
pgoff_t index = readahead_index (ractl );
491
491
pgoff_t limit = (i_size_read (mapping -> host ) - 1 ) >> PAGE_SHIFT ;
492
492
pgoff_t mark = index + ra -> size - ra -> async_size ;
493
+ unsigned int nofs ;
493
494
int err = 0 ;
494
495
gfp_t gfp = readahead_gfp_mask (mapping );
495
496
@@ -504,6 +505,8 @@ void page_cache_ra_order(struct readahead_control *ractl,
504
505
new_order = min_t (unsigned int , new_order , ilog2 (ra -> size ));
505
506
}
506
507
508
+ /* See comment in page_cache_ra_unbounded() */
509
+ nofs = memalloc_nofs_save ();
507
510
filemap_invalidate_lock_shared (mapping );
508
511
while (index <= limit ) {
509
512
unsigned int order = new_order ;
@@ -527,6 +530,7 @@ void page_cache_ra_order(struct readahead_control *ractl,
527
530
528
531
read_pages (ractl );
529
532
filemap_invalidate_unlock_shared (mapping );
533
+ memalloc_nofs_restore (nofs );
530
534
531
535
/*
532
536
* If there were already pages in the page cache, then we may have
You can’t perform that action at this time.
0 commit comments