]> git.ipfire.org Git - thirdparty/linux.git/commit
mm/swapfile.c: call free_swap_slot() in __swap_entry_free()
authorHuang Ying <ying.huang@intel.com>
Fri, 26 Oct 2018 22:03:49 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Oct 2018 23:25:19 +0000 (16:25 -0700)
commit10e364da10d73ce4e3b61e1c53319ce93ee51c63
treedc59810d6cad5311837e68142c84b0cc02339169
parentbcd49e86710b42f15c7512de594d23b3ae0b21d7
mm/swapfile.c: call free_swap_slot() in __swap_entry_free()

This is a code cleanup patch without functionality change.

Originally, when __swap_entry_free() is called, and its return value is 0,
free_swap_slot() will always be called to free the swap entry to the
per-CPU pool.  So move the call to free_swap_slot() to __swap_entry_free()
to simplify the code.

Link: http://lkml.kernel.org/r/20180827075535.17406-3-ying.huang@intel.com
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swapfile.c