summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZicheng Qu <quzicheng@huawei.com>2024-11-01 09:13:24 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2024-11-10 11:50:54 +0800
commite45f0ab6ee48531f8bd4cae94a498893a983a5e1 (patch)
treed7e536626ce8d4c77acc69dcb47e867a449914d7
parenta10549fcce2913be7dc581562ffd8ea35653853e (diff)
downloadlwn-e45f0ab6ee48531f8bd4cae94a498893a983a5e1.tar.gz
lwn-e45f0ab6ee48531f8bd4cae94a498893a983a5e1.zip
padata: Clean up in padata_do_multithreaded()
In commit 24cc57d8faaa ("padata: Honor the caller's alignment in case of chunk_size 0"), the line 'ps.chunk_size = max(ps.chunk_size, 1ul)' was added, making 'ps.chunk_size = 1U' redundant and never executed. Signed-off-by: Zicheng Qu <quzicheng@huawei.com> Acked-by: Daniel Jordan <daniel.m.jordan@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--kernel/padata.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/kernel/padata.c b/kernel/padata.c
index d899f34558af..d51bbc76b227 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -521,13 +521,6 @@ void __init padata_do_multithreaded(struct padata_mt_job *job)
ps.chunk_size = max(ps.chunk_size, 1ul);
ps.chunk_size = roundup(ps.chunk_size, job->align);
- /*
- * chunk_size can be 0 if the caller sets min_chunk to 0. So force it
- * to at least 1 to prevent divide-by-0 panic in padata_mt_helper().`
- */
- if (!ps.chunk_size)
- ps.chunk_size = 1U;
-
list_for_each_entry(pw, &works, pw_list)
if (job->numa_aware) {
int old_node = atomic_read(&last_used_nid);