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

Submitted by Kirill Tkhai on Oct. 17, 2018, 9:08 a.m.

Details

Message ID 153976728005.29624.5620775399892364465.stgit@localhost.localdomain
State New
Series "Order rpc destroy with rpc_queue_work()"
Headers show

Commit Message

Kirill Tkhai Oct. 17, 2018, 9:08 a.m.
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@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_rpc.c |    3 ---
 1 file changed, 3 deletions(-)

Patch hide | download patch | download mbox

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)