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

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 4 23:05:51 MSK 2018


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 at 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 at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_cs.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

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);


More information about the Devel mailing list