|
@@ -2112,7 +2112,12 @@ restart:
|
|
* with multiple processes reclaiming pages, the total
|
|
* with multiple processes reclaiming pages, the total
|
|
* freeing target can get unreasonably large.
|
|
* freeing target can get unreasonably large.
|
|
*/
|
|
*/
|
|
- if (nr_reclaimed >= nr_to_reclaim && priority < DEF_PRIORITY)
|
|
|
|
|
|
+ if (nr_reclaimed >= nr_to_reclaim)
|
|
|
|
+ nr_to_reclaim = 0;
|
|
|
|
+ else
|
|
|
|
+ nr_to_reclaim -= nr_reclaimed;
|
|
|
|
+
|
|
|
|
+ if (!nr_to_reclaim && priority < DEF_PRIORITY)
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
blk_finish_plug(&plug);
|
|
blk_finish_plug(&plug);
|