[RESEND RFC PATCH v2 01/13] mm/swap: remove unused parameter for reading swap header
From: Lian Wang (ProcessMission)
Date: Sat Aug 29 2026 - 03:48:34 EST
From: Kairui Song <kasong@xxxxxxxxxxx>
No feature change, just a minor cleanup.
Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
Signed-off-by: Lian Wang (ProcessMission) <lianux.mm@xxxxxxxxx>
Tested-by: Kunwu Chan <kunwu.chan@xxxxxxxxx>
---
mm/swapfile.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 53bf01d5f7f1..0f962cdfa5c0 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3467,9 +3467,8 @@ __weak unsigned long arch_max_swapfile_size(void)
return generic_max_swapfile_size();
}
-static unsigned long read_swap_header(struct swap_info_struct *si,
- union swap_header *swap_header,
- struct inode *inode)
+static unsigned long read_swap_header(union swap_header *swap_header,
+ struct inode *inode)
{
int i;
unsigned long maxpages;
@@ -3700,7 +3699,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
}
swap_header = kmap_local_folio(folio, 0);
- maxpages = read_swap_header(si, swap_header, inode);
+ maxpages = read_swap_header(swap_header, inode);
if (unlikely(!maxpages)) {
error = -EINVAL;
goto bad_swap_unlock_inode;
base-commit: aeddb4d52acfcc5ce5e988acd48f2906fe966ca3
--
2.55.0