]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commita4006c8019d55481c9efa4fd20eff9e946d49d8e
treee8c2b8dc1eaad373223abe9d809b47b0b3b248aa
parent8febb8e4b078a50ad96cdc127dd06110140cb32b
padata: Remove broken queue flushing

BugLink: https://bugs.launchpad.net/bugs/1866678
[ Upstream commit 07928d9bfc81640bab36f5190e8725894d93b659 ]

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")
Cc: <stable@vger.kernel.org>
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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
kernel/padata.c