Skip to contentSkip to conversation

mm-swapfilec-explicitly-show-ssd-non-ssd-is-handled-mutually-exclusive.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 2, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

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.

---

 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;
-	}