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: remove scan_swap_map_slots() references from comments

The scan_swap_map_slots() helper has been removed, but several comments
still referred to it in swap allocation and reclaim paths. This patch
cleans up those outdated references and reflows the affected comment
blocks to match kernel coding style.

Link: https://lkml.kernel.org/r/20251031065011.40863-6-youngjun.park@lge.com
Signed-off-by: Youngjun Park <youngjun.park@lge.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Acked-by: Chris Li <chrisl@kernel.org>
Cc: Barry Song <baohua@kernel.org>
Cc: Kairui Song <kasong@tencent.com>
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
b7dd80f8 4c239d5f

+9 -11
+9 -11
mm/swapfile.c
··· 236 236 ret = -nr_pages; 237 237 238 238 /* 239 - * When this function is called from scan_swap_map_slots() and it's 240 - * called by vmscan.c at reclaiming folios. So we hold a folio lock 241 - * here. We have to use trylock for avoiding deadlock. This is a special 242 - * case and you should use folio_free_swap() with explicit folio_lock() 243 - * in usual operations. 239 + * We hold a folio lock here. We have to use trylock for 240 + * avoiding deadlock. This is a special case and you should 241 + * use folio_free_swap() with explicit folio_lock() in usual 242 + * operations. 244 243 */ 245 244 if (!folio_trylock(folio)) 246 245 goto out; ··· 1364 1365 spin_lock(&swap_avail_lock); 1365 1366 /* 1366 1367 * if we got here, it's likely that si was almost full before, 1367 - * and since scan_swap_map_slots() can drop the si->lock, 1368 1368 * multiple callers probably all tried to get a page from the 1369 1369 * same si and it filled up before we could get one; or, the si 1370 - * filled up between us dropping swap_avail_lock and taking 1371 - * si->lock. Since we dropped the swap_avail_lock, the 1372 - * swap_avail_head list may have been modified; so if next is 1373 - * still in the swap_avail_head list then try it, otherwise 1374 - * start over if we have not gotten any slots. 1370 + * filled up between us dropping swap_avail_lock. 1371 + * Since we dropped the swap_avail_lock, the swap_avail_list 1372 + * may have been modified; so if next is still in the 1373 + * swap_avail_head list then try it, otherwise start over if we 1374 + * have not gotten any slots. 1375 1375 */ 1376 1376 if (plist_node_empty(&next->avail_list)) 1377 1377 goto start_over;