Commit 24cc57d8 authored by Kamlesh Gurudasani's avatar Kamlesh Gurudasani Committed by Herbert Xu
Browse files

padata: Honor the caller's alignment in case of chunk_size 0



In the case where we are forcing the ps.chunk_size to be at least 1,
we are ignoring the caller's alignment.

Move the forcing of ps.chunk_size to be at least 1 before rounding it
up to caller's alignment, so that caller's alignment is honored.

While at it, use max() to force the ps.chunk_size to be at least 1 to
improve readability.

Fixes: 6d45e1c9 ("padata: Fix possible divide-by-0 panic in padata_mt_helper()")
Signed-off-by: default avatarKamlesh Gurudasani <kamlesh@ti.com>
Acked-by: default avatar  Waiman Long <longman@redhat.com>
Acked-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c7de6ee3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment