]> Git Repo - linux.git/commit
mm/swapfile.c: clear si->swap_map[] in swap_free_cluster()
authorHuang Ying <[email protected]>
Fri, 26 Oct 2018 22:03:53 +0000 (15:03 -0700)
committerLinus Torvalds <[email protected]>
Fri, 26 Oct 2018 23:25:19 +0000 (16:25 -0700)
commit979aafa5919b106a65646ac5f73f8354c0164e63
treecd338b6a7f932b757020704eefdf1c3e66cebf7e
parent10e364da10d73ce4e3b61e1c53319ce93ee51c63
mm/swapfile.c: clear si->swap_map[] in swap_free_cluster()

si->swap_map[] of the swap entries in cluster needs to be cleared during
freeing.  Previously, this is done in the caller of swap_free_cluster().
This may cause code duplication (one user now, will add more users later)
and lock/unlock cluster unnecessarily.  In this patch, the clearing code
is moved to swap_free_cluster() to avoid the downside.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: "Huang, Ying" <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/swapfile.c
This page took 0.050306 seconds and 4 git commands to generate.