[RHEL7,COMMIT] fuse kio: Remove useless code in pcs_cs_destroy()

Submitted by Konstantin Khorenko on June 4, 2018, 8:05 p.m.

Details

Message ID 201806042005.w54K5pNd005155@finist_ce7.work
State New
Series "fuse kio: Remove useless code in pcs_cs_destroy()"
Headers show

Commit Message

Konstantin Khorenko June 4, 2018, 8:05 p.m.
The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.50.4
------>
commit 2e39d2db8037edfdcec6a293549438edb3e54be6
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Mon Jun 4 23:05:51 2018 +0300

    fuse kio: Remove useless code in pcs_cs_destroy()
    
    We have kfree_rcu() for a long time in kernel.
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_cs.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_cs.c b/fs/fuse/kio/pcs/pcs_cs.c
index cae591e65a42..899bf5c9f650 100644
--- a/fs/fuse/kio/pcs/pcs_cs.c
+++ b/fs/fuse/kio/pcs/pcs_cs.c
@@ -741,13 +741,6 @@  static void pcs_cs_isolate(struct pcs_cs *cs, struct list_head *dispose)
 	BUG_ON(cs->nflows);
 }
 
-static void cs_free_callback(struct rcu_head *head)
-{
-	struct pcs_cs *cs = container_of(head, struct pcs_cs, rcu);
-
-	kfree(cs);
-}
-
 static void pcs_cs_destroy(struct pcs_cs *cs)
 {
 	BUG_ON(!list_empty(&cs->active_list));
@@ -758,10 +751,9 @@  static void pcs_cs_destroy(struct pcs_cs *cs)
 		pcs_rpc_close(cs->rpc);
 		cs->rpc = NULL;
 	}
-	call_rcu(&cs->rcu, cs_free_callback);
+	kfree_rcu(cs, rcu);
 }
 
-
 void cs_aborting(struct pcs_rpc *ep, int error)
 {
 	pcs_rpc_reset(ep);