aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKairui Song <[email protected]>2022-12-20 02:58:40 +0800
committerAndrew Morton <[email protected]>2023-01-18 17:12:45 -0800
commitcbc2bd98db85504074c1b94175e5e136e457dc0b (patch)
tree67775d3bb34faee300c78a1e88c82e366956f2f3 /include/linux
parent16ba391e9c6bc26e6f0c950f2117f57b8e542d71 (diff)
swap: avoid holding swap reference in swap_cache_get_folio
All its callers either already hold a reference to, or lock the swap device while calling this function. There is only one exception in shmem_swapin_folio, just make this caller also hold a reference of the swap device, so this helper can be simplified and saves a few cycles. This also provides finer control of error handling in shmem_swapin_folio, on race (with swap off), it can just try again. For invalid swap entry, it can fail with a proper error code. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kairui Song <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: "Huang, Ying" <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Miaohe Lin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions