Skip to contentSkip to conversation

mm-swap-improve-readability-via-make-spin_lock-unlock-balanced.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 4, 2017

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm, swap: improve readability via make spin_lock/unlock balanced
has been removed from the -mm tree. Its filename was
mm-swap-improve-readability-via-make-spin_lock-unlock-balanced.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Huang Ying <[email protected]>
Subject: mm, swap: improve readability via make spin_lock/unlock balanced

This is just a cleanup patch, no functionality change. In cluster_list_add_tail(), spin_lock_nested() is used to lock the cluster, while unlock_cluster() is used to unlock the cluster. To improve the code readability. Use spin_unlock() directly to unlock the cluster.

---

 mm/swapfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/swapfile.c renamed from mm/swapfile.c~mm-swap-improve-readability-via-make-spin_lock-unlock-balanced +1 -1
diff -puN mm/swapfile.c~mm-swap-improve-readability-via-make-spin_lock-unlock-balanced mm/swapfile.c
@@ -335,7 +335,7 @@ static void cluster_list_add_tail(struct
 		ci_tail = ci + tail;
 		spin_lock_nested(&ci_tail->lock, SINGLE_DEPTH_NESTING);
 		cluster_set_next(ci_tail, idx);
-		unlock_cluster(ci_tail);
+		spin_unlock(&ci_tail->lock);
 		cluster_set_next_flag(&list->tail, idx, 0);
 	}
 }

_

Patches currently in -mm which might be from [email protected] are

mm-swap-use-kvzalloc-to-allocate-some-swap-data-structure.patch