From: Kairui Song No feature change, just a minor cleanup. Signed-off-by: Kairui Song Signed-off-by: Lian Wang --- mm/swapfile.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index c3288910b3e3..7acb33cd8b71 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3568,9 +3568,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; @@ -3801,7 +3800,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;