Commit 1326359
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>1 parent 69805ea commit 1326359
1 file changed
Lines changed: 19 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2357 | 2357 | | |
2358 | 2358 | | |
2359 | 2359 | | |
2360 | | - | |
2361 | 2360 | | |
| 2361 | + | |
2362 | 2362 | | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
2366 | 2367 | | |
2367 | | - | |
| 2368 | + | |
| 2369 | + | |
2368 | 2370 | | |
2369 | | - | |
2370 | | - | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
2371 | 2374 | | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
2378 | | - | |
2379 | | - | |
2380 | | - | |
2381 | | - | |
2382 | | - | |
2383 | | - | |
2384 | | - | |
2385 | | - | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
2386 | 2379 | | |
2387 | | - | |
2388 | | - | |
2389 | | - | |
2390 | | - | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2391 | 2385 | | |
2392 | 2386 | | |
2393 | | - | |
2394 | 2387 | | |
2395 | 2388 | | |
2396 | 2389 | | |
| |||
0 commit comments