* [PATCH] xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls
@ 2021-10-14 18:37 Christophe JAILLET
2021-10-14 19:42 ` Stefano Stabellini
0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2021-10-14 18:37 UTC (permalink / raw)
To: boris.ostrovsky, jgross, sstabellini
Cc: xen-devel, linux-kernel, kernel-janitors, Christophe JAILLET
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.
Remove the redundant 'flush_workqueue()' calls.
This was generated with coccinelle:
@@
expression E;
@@
- flush_workqueue(E);
destroy_workqueue(E);
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/xen/pvcalls-back.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c
index b47fd8435061..d6f945fd4147 100644
--- a/drivers/xen/pvcalls-back.c
+++ b/drivers/xen/pvcalls-back.c
@@ -465,7 +465,6 @@ static int pvcalls_back_release_passive(struct xenbus_device *dev,
write_unlock_bh(&mappass->sock->sk->sk_callback_lock);
}
sock_release(mappass->sock);
- flush_workqueue(mappass->wq);
destroy_workqueue(mappass->wq);
kfree(mappass);
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls
2021-10-14 18:37 [PATCH] xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls Christophe JAILLET
@ 2021-10-14 19:42 ` Stefano Stabellini
2021-10-27 13:20 ` Boris Ostrovsky
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2021-10-14 19:42 UTC (permalink / raw)
To: Christophe JAILLET
Cc: boris.ostrovsky, jgross, sstabellini, xen-devel, linux-kernel,
kernel-janitors
On Thu, 14 Oct 2021, Christophe JAILLET wrote:
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
>
> Remove the redundant 'flush_workqueue()' calls.
>
> This was generated with coccinelle:
>
> @@
> expression E;
> @@
> - flush_workqueue(E);
> destroy_workqueue(E);
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> drivers/xen/pvcalls-back.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c
> index b47fd8435061..d6f945fd4147 100644
> --- a/drivers/xen/pvcalls-back.c
> +++ b/drivers/xen/pvcalls-back.c
> @@ -465,7 +465,6 @@ static int pvcalls_back_release_passive(struct xenbus_device *dev,
> write_unlock_bh(&mappass->sock->sk->sk_callback_lock);
> }
> sock_release(mappass->sock);
> - flush_workqueue(mappass->wq);
> destroy_workqueue(mappass->wq);
> kfree(mappass);
>
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls
2021-10-14 19:42 ` Stefano Stabellini
@ 2021-10-27 13:20 ` Boris Ostrovsky
0 siblings, 0 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2021-10-27 13:20 UTC (permalink / raw)
To: Stefano Stabellini, Christophe JAILLET
Cc: jgross, xen-devel, linux-kernel, kernel-janitors
On 10/14/21 3:42 PM, Stefano Stabellini wrote:
> On Thu, 14 Oct 2021, Christophe JAILLET wrote:
>> 'destroy_workqueue()' already drains the queue before destroying it, so
>> there is no need to flush it explicitly.
>>
>> Remove the redundant 'flush_workqueue()' calls.
>>
>> This was generated with coccinelle:
>>
>> @@
>> expression E;
>> @@
>> - flush_workqueue(E);
>> destroy_workqueue(E);
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
>
Applied to for-linus-5.16
-boris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-27 13:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 18:37 [PATCH] xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls Christophe JAILLET
2021-10-14 19:42 ` Stefano Stabellini
2021-10-27 13:20 ` Boris Ostrovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).