Skip to content

Cleanup scan_swap_map_slots() a little

Wei Yang linux-mm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew 2 of 3 applied

Patches in v1 2 of 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/swapfile.c: offset is only used when there is more slotsmm/swapfile.c+1 -30 replies
2/3mm/swapfile.c: explicitly show ssd/non-ssd is handled mutually exclusivemm/swapfile.c+3 -70 repliesApplied
3/3mm/swapfile.c: remove the unnecessary goto for SSD casemm/swapfile.c+1 -50 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Cleanup scan_swap_map_slots() a little

Function scan_swap_map_slots() is used to iterate swap_map[] array for an available swap entry. While after several optimizations, e.g. for ssd case, the logic of this function is a little not easy to catch.

This patch set tries to clean up the logic a little:

* shows the ssd/non-ssd case is handled mutually exclusively
* remove some unnecessary goto for ssd case

Wei Yang (3):
mm/swapfile.c: offset is only used when there is more slots mm/swapfile.c: explicitly show ssd/non-ssd is handled mutually
exclusive
mm/swapfile.c: remove the unnecessary goto for SSD case

 mm/swapfile.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
Signature · 1 line
2.23.0