Skip to content

Commit

Permalink
ksmbd: Remove redundant 'flush_workqueue()' calls
Browse files Browse the repository at this point in the history
'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);

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
tititiou36 authored and Steve French committed Nov 7, 2021
1 parent 341b160 commit e8d585b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion fs/ksmbd/ksmbd_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ int ksmbd_workqueue_init(void)

void ksmbd_workqueue_destroy(void)
{
flush_workqueue(ksmbd_wq);
destroy_workqueue(ksmbd_wq);
ksmbd_wq = NULL;
}
Expand Down
1 change: 0 additions & 1 deletion fs/ksmbd/transport_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,6 @@ int ksmbd_rdma_destroy(void)
smb_direct_listener.cm_id = NULL;

if (smb_direct_wq) {
flush_workqueue(smb_direct_wq);
destroy_workqueue(smb_direct_wq);
smb_direct_wq = NULL;
}
Expand Down

0 comments on commit e8d585b

Please sign in to comment.