aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-02-14 17:48:49 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-01-31 21:37:23 -0500
commitfda1bfef9e465b28260d27cd9e538dd601c4cdc1 (patch)
tree125a5a8dbc027a9149d5ad4208bd27fe68a8009f /net/sunrpc
parentSUNRPC: Uninline xprt_get(); It isn't performance critical. (diff)
downloadlinux-dev-fda1bfef9e465b28260d27cd9e538dd601c4cdc1.tar.xz
linux-dev-fda1bfef9e465b28260d27cd9e538dd601c4cdc1.zip
SUNRPC: Make freeing of struct xprt rcu-safe
Have it call kfree_rcu() to ensure that we can use it on rcu-protected lists. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index d8fd84c0cbba..605858699f6c 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -48,6 +48,7 @@
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/metrics.h>
#include <linux/sunrpc/bc_xprt.h>
+#include <linux/rcupdate.h>
#include <trace/events/sunrpc.h>
@@ -1166,7 +1167,7 @@ void xprt_free(struct rpc_xprt *xprt)
{
put_net(xprt->xprt_net);
xprt_free_all_slots(xprt);
- kfree(xprt);
+ kfree_rcu(xprt, rcu);
}
EXPORT_SYMBOL_GPL(xprt_free);