Skip to content

Commit e45f0ab

Browse files
Zicheng Quherbertx
authored andcommitted
padata: Clean up in padata_do_multithreaded()
In commit 24cc57d ("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 <[email protected]> Acked-by: Daniel Jordan <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent a10549f commit e45f0ab

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

kernel/padata.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,6 @@ void __init padata_do_multithreaded(struct padata_mt_job *job)
521521
ps.chunk_size = max(ps.chunk_size, 1ul);
522522
ps.chunk_size = roundup(ps.chunk_size, job->align);
523523

524-
/*
525-
* chunk_size can be 0 if the caller sets min_chunk to 0. So force it
526-
* to at least 1 to prevent divide-by-0 panic in padata_mt_helper().`
527-
*/
528-
if (!ps.chunk_size)
529-
ps.chunk_size = 1U;
530-
531524
list_for_each_entry(pw, &works, pw_list)
532525
if (job->numa_aware) {
533526
int old_node = atomic_read(&last_used_nid);

0 commit comments

Comments
 (0)