aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sunrpc/svc_xprt.h2
-rw-r--r--net/sunrpc/svc_xprt.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 5f4e18b3ce73..e50e3eca1c7c 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -66,6 +66,8 @@ struct svc_xprt {
66 struct sockaddr_storage xpt_remote; /* remote peer's address */ 66 struct sockaddr_storage xpt_remote; /* remote peer's address */
67 size_t xpt_remotelen; /* length of address */ 67 size_t xpt_remotelen; /* length of address */
68 struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ 68 struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */
69
70 struct net *xpt_net;
69}; 71};
70 72
71int svc_reg_xprt_class(struct svc_xprt_class *); 73int svc_reg_xprt_class(struct svc_xprt_class *);
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 385d822419ca..f7e8915051b1 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -130,6 +130,7 @@ static void svc_xprt_free(struct kref *kref)
130 struct module *owner = xprt->xpt_class->xcl_owner; 130 struct module *owner = xprt->xpt_class->xcl_owner;
131 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) 131 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags))
132 svcauth_unix_info_release(xprt); 132 svcauth_unix_info_release(xprt);
133 put_net(xprt->xpt_net);
133 xprt->xpt_ops->xpo_free(xprt); 134 xprt->xpt_ops->xpo_free(xprt);
134 module_put(owner); 135 module_put(owner);
135} 136}
@@ -159,6 +160,7 @@ void svc_xprt_init(struct svc_xprt_class *xcl, struct svc_xprt *xprt,
159 spin_lock_init(&xprt->xpt_lock); 160 spin_lock_init(&xprt->xpt_lock);
160 set_bit(XPT_BUSY, &xprt->xpt_flags); 161 set_bit(XPT_BUSY, &xprt->xpt_flags);
161 rpc_init_wait_queue(&xprt->xpt_bc_pending, "xpt_bc_pending"); 162 rpc_init_wait_queue(&xprt->xpt_bc_pending, "xpt_bc_pending");
163 xprt->xpt_net = get_net(&init_net);
162} 164}
163EXPORT_SYMBOL_GPL(svc_xprt_init); 165EXPORT_SYMBOL_GPL(svc_xprt_init);
164 166