OpenVZ Forum


Home » Mailing lists » Devel » [PATCH v3, RESEND 04/16] sunrpc: tag svc_serv with rpc_pipefs mount point
[PATCH v3, RESEND 04/16] sunrpc: tag svc_serv with rpc_pipefs mount point [message #42044] Tue, 08 February 2011 18:41
Kirill A. Shutemov is currently offline  Kirill A. Shutemov
Messages: 37
Registered: January 2011
Member
From: *parallels.com
Signed-off-by: Kirill A. Shutemov <kas@openvz.org>
Reviewed-by: Rob Landley <rlandley@parallels.com>
---
include/linux/sunrpc/svc.h | 1 +
net/sunrpc/svc.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index ea29330..0cfd8e8 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -64,6 +64,7 @@ struct svc_pool {
*/
struct svc_serv {
struct svc_program * sv_program; /* RPC program */
+ struct vfsmount * sv_rpcmount; /* rpc_pipefs mount point*/
struct svc_stat * sv_stats; /* RPC statistics */
spinlock_t sv_lock;
unsigned int sv_nrthreads; /* # of server threads */
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 08e05a8..370bc46 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/slab.h>
+#include <linux/mount.h>

#include <linux/sunrpc/types.h>
#include <linux/sunrpc/xdr.h>
@@ -27,6 +28,7 @@
#include <linux/sunrpc/svcsock.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/bc_xprt.h>
+#include <linux/sunrpc/rpc_pipe_fs.h>

#define RPCDBG_FACILITY RPCDBG_SVCDSP

@@ -371,6 +373,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
return NULL;
serv->sv_name = prog->pg_name;
serv->sv_program = prog;
+ serv->sv_rpcmount = mntget(init_rpc_pipefs);
serv->sv_nrthreads = 1;
serv->sv_stats = prog->pg_stats;
if (bufsize > RPCSVC_MAXPAYLOAD)
@@ -488,6 +491,7 @@ svc_destroy(struct svc_serv *serv)
if (svc_serv_is_pooled(serv))
svc_pool_map_put();

+ mntput(serv->sv_rpcmount);
svc_unregister(serv);
kfree(serv->sv_pools);
kfree(serv);
--
1.7.4

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containe rs
Previous Topic: [PATCH v3, RESEND 01/16] sunrpc: mount rpc_pipefs on initialization
Next Topic: [PATCH v3, RESEND 00/16] make rpc_pipefs be mountable multiple time
Goto Forum:
  


Current Time: Wed Dec 12 07:04:25 GMT 2018