swap_slots.c (97acb6a8fcc4e5c2cdc2693a35acdc5a7461aaa3) | swap_slots.c (4081f7446d95a9d3ced12dc04ff02c187a761e90) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Manage cache of swap slots to be used for and returned from 4 * swap. 5 * 6 * Copyright(c) 2016 Intel Corporation. 7 * 8 * Author: Tim Chen <tim.c.chen@linux.intel.com> --- 329 unchanged lines hidden (view full) --- 338 mutex_unlock(&cache->alloc_lock); 339 if (entry.val) 340 goto out; 341 } 342 343 get_swap_pages(1, &entry, 1); 344out: 345 if (mem_cgroup_try_charge_swap(folio, entry)) { | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Manage cache of swap slots to be used for and returned from 4 * swap. 5 * 6 * Copyright(c) 2016 Intel Corporation. 7 * 8 * Author: Tim Chen <tim.c.chen@linux.intel.com> --- 329 unchanged lines hidden (view full) --- 338 mutex_unlock(&cache->alloc_lock); 339 if (entry.val) 340 goto out; 341 } 342 343 get_swap_pages(1, &entry, 1); 344out: 345 if (mem_cgroup_try_charge_swap(folio, entry)) { |
346 put_swap_page(&folio->page, entry); | 346 put_swap_folio(folio, entry); |
347 entry.val = 0; 348 } 349 return entry; 350} | 347 entry.val = 0; 348 } 349 return entry; 350} |