X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=mm%2Fswap_state.c;h=539b8885e3d1d4942dbb905b60b87d40726e3de5;hb=36c344f3f1ffc0b1b20abd237b7401dc6687ee8f;hp=473b71e052a8ed29df7c496af747e2b43491c782;hpb=99dd3c53f6a0350f17234baff728144cc981a8b7;p=mirror_ubuntu-artful-kernel.git diff --git a/mm/swap_state.c b/mm/swap_state.c index 473b71e052a8..539b8885e3d1 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -360,17 +360,7 @@ struct page *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, /* * We might race against get_swap_page() and stumble * across a SWAP_HAS_CACHE swap_map entry whose page - * has not been brought into the swapcache yet, while - * the other end is scheduled away waiting on discard - * I/O completion at scan_swap_map(). - * - * In order to avoid turning this transitory state - * into a permanent loop around this -EEXIST case - * if !CONFIG_PREEMPT and the I/O completion happens - * to be waiting on the CPU waitqueue where we are now - * busy looping, we just conditionally invoke the - * scheduler here, if there are some more important - * tasks to run. + * has not been brought into the swapcache yet. */ cond_resched(); continue; @@ -533,7 +523,7 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages) unsigned int i, nr; nr = DIV_ROUND_UP(nr_pages, SWAP_ADDRESS_SPACE_PAGES); - spaces = vzalloc(sizeof(struct address_space) * nr); + spaces = kvzalloc(sizeof(struct address_space) * nr, GFP_KERNEL); if (!spaces) return -ENOMEM; for (i = 0; i < nr; i++) {