diff --git a/mm/swapfile.c b/mm/swapfile.c index eaf483c7c83e7691297d12b818bfe20ffa1104e8..9fe12f0b92058760582d28cb3f3f41f1b607a327 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1104,6 +1104,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: