Skip to contentSkip to conversation

padata: Replace bottom-half spinlock variants

PATCH In review Daniel Jordan 2 participants 2 messages Jul 17

Subsystems (2)
lore
Share & tools
lore

Daniel Jordan

author maintainer
#0 lore raw

PATCH 1/1 padata: Replace bottom-half spinlock variants

Padata no longer runs in softirq context, so normal non-bottom-half spinlock calls will suffice.

---

Based on latest upstream plus Eric's four padata changes from

    https://lore.kernel.org/linux-crypto/[email protected]/
    https://lore.kernel.org/all/[email protected]/
 kernel/padata.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/padata.c +4 -4
index a28fe0c4f66b5..1d095986add28 100644
@@ -75,7 +75,7 @@ static int __init padata_work_alloc_mt(int nworks, void *data,
 {
 	int i;
 
-	spin_lock_bh(&padata_works_lock);
+	spin_lock(&padata_works_lock);
 	/* Start at 1 because the current task participates in the job. */
 	for (i = 1; i < nworks; ++i) {
 		struct padata_work *pw = padata_work_alloc();
@@ -85,7 +85,7 @@ static int __init padata_work_alloc_mt(int nworks, void *data,
 		padata_work_init(pw, padata_mt_helper, data, 0);
 		list_add(&pw->pw_list, head);
 	}
-	spin_unlock_bh(&padata_works_lock);
+	spin_unlock(&padata_works_lock);
 
 	return i;
 }
@@ -103,12 +103,12 @@ static void __init padata_works_free(struct list_head *works)
 	if (list_empty(works))
 		return;
 
-	spin_lock_bh(&padata_works_lock);
+	spin_lock(&padata_works_lock);
 	list_for_each_entry_safe(cur, next, works, pw_list) {
 		list_del(&cur->pw_list);
 		padata_work_free(cur);
 	}
-	spin_unlock_bh(&padata_works_lock);
+	spin_unlock(&padata_works_lock);
 }
 
 static void __init padata_mt_helper(struct work_struct *w)

base-commit: af5e34a41cd607c00ef752e00331736570992354
prerequisite-patch-id: 57ddb64f17182e9382163da55150610d385274df
prerequisite-patch-id: 9ea2c856c57f6c92abe7f2b52e701e46398cb5bb
prerequisite-patch-id: d64acc3296775ba4482d99b5a7d567af22a859a5
prerequisite-patch-id: 095134ce73f4279a0af1708ed2de4135bcb3e2eb

Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Daniel Jordan

Padata no longer runs in softirq context, so normal non-bottom-half spinlock calls will suffice.

Quoted 8 lines

---

Based on latest upstream plus Eric's four padata changes from

    https://lore.kernel.org/linux-crypto/[email protected]/
    https://lore.kernel.org/all/[email protected]/
 kernel/padata.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

- Eric