mm-swapfilec-explicitly-show-ssd-non-ssd-is-handled-mutually-exclusive.patch removed from -mm tree
The patch titled
Subject: mm/swapfile.c: explicitly show ssd/non-ssd is handled mutually exclusive
has been removed from the -mm tree. Its filename was
mm-swapfilec-explicitly-show-ssd-non-ssd-is-handled-mutually-exclusive.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/swapfile.c: explicitly show ssd/non-ssd is handled mutually exclusive
The code shows if this is ssd, it will jump to specific tag and skip the following code for non-ssd.
Let's use "else if" to explicitly show the mutually exclusion for ssd/non-ssd to reduce ambiguity.
Signed-off-by Wei Yang <[email protected]>
Reviewed-by Andrew Morton <[email protected]>
Cc Tim Chen <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/swapfile.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
mm/swapfile.c renamed from mm/swapfile.c~mm-swapfilec-explicitly-show-ssd-non-ssd-is-handled-mutually-exclusive +1 -4
@@ -763,9 +763,7 @@ static int scan_swap_map_slots(struct sw goto checks; else goto scan; - } - -if (unlikely (!si->cluster_nr--)) { + }else if (unlikely (!si->cluster_nr--)) {if (si->pages - si->inuse_pages <SWAPFILE_CLUSTER ) { si->cluster_nr =SWAPFILE_CLUSTER -1 ; goto checks;
@@ -873,10 +871,8 @@ checks: goto checks; else goto done; - }