]> git.ipfire.org Git - thirdparty/linux.git/commit
mm/shmem, swap: simplify swapin path and result handling
authorKairui Song <kasong@tencent.com>
Mon, 28 Jul 2025 07:53:04 +0000 (15:53 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 2 Aug 2025 19:06:13 +0000 (12:06 -0700)
commit1326359f22805b2b0e9567ec0099980b8956fc29
tree37b713c8df86d37fd6b22051ab69df8cf0f23a38
parent69805ea79db6634d4e7d596f3f36667924dc6cbf
mm/shmem, swap: simplify swapin path and result handling

Slightly tidy up the different handling of swap in and error handling for
SWP_SYNCHRONOUS_IO and non-SWP_SYNCHRONOUS_IO devices.  Now swapin will
always use either shmem_swap_alloc_folio or shmem_swapin_cluster, then
check the result.

Simplify the control flow and avoid a redundant goto label.

Link: https://lkml.kernel.org/r/20250728075306.12704-7-ryncsn@gmail.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c