Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: swap: change swap_alloc_slow() to void

swap_alloc_slow() does not need to return a bool, as all callers handle
allocation results via the entry parameter. Update the function signature
and remove return statements accordingly.

Link: https://lkml.kernel.org/r/20251031065011.40863-5-youngjun.park@lge.com
Signed-off-by: Youngjun Park <youngjun.park@lge.com>
Reviewed-by: Kairui Song <kasong@tencent.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Acked-by: Chris Li <chrisl@kernel.org>
Cc: Barry Song <baohua@kernel.org>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Youngjun Park and committed by
Andrew Morton
4c239d5f f1bae15c

+3 -4
+3 -4
mm/swapfile.c
··· 1339 1339 } 1340 1340 1341 1341 /* Rotate the device and switch to a new cluster */ 1342 - static bool swap_alloc_slow(swp_entry_t *entry, 1342 + static void swap_alloc_slow(swp_entry_t *entry, 1343 1343 int order) 1344 1344 { 1345 1345 unsigned long offset; ··· 1356 1356 put_swap_device(si); 1357 1357 if (offset) { 1358 1358 *entry = swp_entry(si->type, offset); 1359 - return true; 1359 + return; 1360 1360 } 1361 1361 if (order) 1362 - return false; 1362 + return; 1363 1363 } 1364 1364 1365 1365 spin_lock(&swap_avail_lock); ··· 1378 1378 goto start_over; 1379 1379 } 1380 1380 spin_unlock(&swap_avail_lock); 1381 - return false; 1382 1381 } 1383 1382 1384 1383 /*