diff --git a/mm/swapfile.c b/mm/swapfile.c index 4594e808ebc062e40c031ea3a9ce9997e0aa644f..14e2396fa8a31aa99db03cd7e21386c974e605a6 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1113,6 +1113,7 @@ int get_swap_pages(int n_goal, swp_entry_t swp_entries[], int entry_size) goto check_out; pr_debug("scan_swap_map of si %d failed to find offset\n", si->type); + cond_resched(); spin_lock(&swap_avail_lock); nextsi: