summaryrefslogtreecommitdiff
path: root/Documentation/dev-tools
diff options
context:
space:
mode:
authorKairui Song <kasong@tencent.com>2022-12-19 21:58:40 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-01-19 04:12:45 +0300
commitcbc2bd98db85504074c1b94175e5e136e457dc0b (patch)
tree67775d3bb34faee300c78a1e88c82e366956f2f3 /Documentation/dev-tools
parent16ba391e9c6bc26e6f0c950f2117f57b8e542d71 (diff)
downloadlinux-cbc2bd98db85504074c1b94175e5e136e457dc0b.tar.xz
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/20221219185840.25441-5-ryncsn@gmail.com Signed-off-by: Kairui Song <kasong@tencent.com> Cc: David Hildenbrand <david@redhat.com> Cc: "Huang, Ying" <ying.huang@intel.com> Cc: Hugh Dickins <hughd@google.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Documentation/dev-tools')
0 files changed, 0 insertions, 0 deletions