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/swapfile.c: remove the unneeded checking

In free_swap_and_cache_nr(), invocation of get_swap_device() has done the
checking if it's a swap entry. So remove the redundant checking here.

Link: https://lkml.kernel.org/r/20250205092721.9395-10-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <ryncsn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Baoquan He and committed by
Andrew Morton
ac2d3268 e89c45c7

-3
-3
mm/swapfile.c
··· 1789 1789 bool any_only_cache = false; 1790 1790 unsigned long offset; 1791 1791 1792 - if (non_swap_entry(entry)) 1793 - return; 1794 - 1795 1792 si = get_swap_device(entry); 1796 1793 if (!si) 1797 1794 return;