]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
padata: Remove broken queue flushing
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 19 Nov 2019 05:17:31 +0000 (13:17 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 May 2020 20:19:14 +0000 (21:19 +0100)
commit13721e447acc2b82c19cf72e9e6c4291c77693ed
treeae8002144ad2cf4b3a419e8d84691c046c5097f2
parentabf56e87d70c00ffca2b71bd22cd25b34b886bcd
padata: Remove broken queue flushing

commit 07928d9bfc81640bab36f5190e8725894d93b659 upstream.

The function padata_flush_queues is fundamentally broken because
it cannot force padata users to complete the request that is
underway.  IOW padata has to passively wait for the completion
of any outstanding work.

As it stands flushing is used in two places.  Its use in padata_stop
is simply unnecessary because nothing depends on the queues to
be flushed afterwards.

The other use in padata_replace is more substantial as we depend
on it to free the old pd structure.  This patch instead uses the
pd->refcnt to dynamically free the pd structure once all requests
are complete.

Fixes: 2b73b07ab8a4 ("padata: Flush the padata queues actively")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/padata.c