diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 9c7e57cc63a3..199fa436c0dd 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -213,8 +213,9 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
213 | list_for_each_entry(shrinker, &shrinker_list, list) { | 213 | list_for_each_entry(shrinker, &shrinker_list, list) { |
214 | unsigned long long delta; | 214 | unsigned long long delta; |
215 | unsigned long total_scan; | 215 | unsigned long total_scan; |
216 | unsigned long max_pass = (*shrinker->shrink)(0, gfp_mask); | 216 | unsigned long max_pass; |
217 | 217 | ||
218 | max_pass = (*shrinker->shrink)(shrinker, 0, gfp_mask); | ||
218 | delta = (4 * scanned) / shrinker->seeks; | 219 | delta = (4 * scanned) / shrinker->seeks; |
219 | delta *= max_pass; | 220 | delta *= max_pass; |
220 | do_div(delta, lru_pages + 1); | 221 | do_div(delta, lru_pages + 1); |
@@ -242,8 +243,9 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
242 | int shrink_ret; | 243 | int shrink_ret; |
243 | int nr_before; | 244 | int nr_before; |
244 | 245 | ||
245 | nr_before = (*shrinker->shrink)(0, gfp_mask); | 246 | nr_before = (*shrinker->shrink)(shrinker, 0, gfp_mask); |
246 | shrink_ret = (*shrinker->shrink)(this_scan, gfp_mask); | 247 | shrink_ret = (*shrinker->shrink)(shrinker, this_scan, |
248 | gfp_mask); | ||
247 | if (shrink_ret == -1) | 249 | if (shrink_ret == -1) |
248 | break; | 250 | break; |
249 | if (shrink_ret < nr_before) | 251 | if (shrink_ret < nr_before) |