[Devel] [PATCH RESEND 1/4] fuse kio: Stop self-abuse of rpc counter in rpc_queue_work()

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


These useless get and put do not protect from anything,
since the work may become executing after last user put
counter in parallel. Remove them to avoid shooting of
BUG_ON() in pcs_rpc_get().

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rpc.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c
index 7ef69a842ce8..27156a507a84 100644
--- a/fs/fuse/kio/pcs/pcs_rpc.c
+++ b/fs/fuse/kio/pcs/pcs_rpc.c
@@ -847,7 +847,6 @@ static void rpc_queue_work(struct work_struct *w)
 	struct pcs_rpc *ep = pcs_rpc_from_work(w);
 	int repeat;
 
-	pcs_rpc_get(ep);
 again:
 	spin_lock(&ep->q_lock);
 	list_splice_tail_init(&ep->input_queue, &input_q);
@@ -893,8 +892,6 @@ static void rpc_queue_work(struct work_struct *w)
 	mutex_unlock(&ep->mutex);
 	if (repeat)
 		goto again;
-	pcs_rpc_put(ep);
-
 }
 
 struct pcs_rpc * pcs_rpc_alloc_ep(void)



More information about the Devel mailing list