[Devel] [PATCH RESEND 4/4] fs/fuse kio_pcs: flush rpc work inside pcs_rpc_destroy()

Kirill Tkhai ktkhai at virtuozzo.com
Wed Oct 17 12:08:18 MSK 2018


From: Pavel Butsykin <pbutsykin at virtuozzo.com>

This flush is necessary to done pending messages and
to execute queued work before we free rpc memory.

Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
ktkhai: comment rewritten
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rpc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c
index 0717eeb6e99f..f6b8aefe6884 100644
--- a/fs/fuse/kio/pcs/pcs_rpc.c
+++ b/fs/fuse/kio/pcs/pcs_rpc.c
@@ -312,6 +312,7 @@ static void pcs_rpc_destroy(struct pcs_rpc *ep)
 	BUG_ON(timer_pending(&ep->timer_work.timer));
 
 	cancel_delayed_work_sync(&ep->calendar_work);
+	flush_work(&ep->work);
 
 	/* pcs_free(ep->sun); */
 	/* ep->sun = NULL; */



More information about the Devel mailing list