From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kirill A. Shutemov" Subject: [PATCH v3 04/16] sunrpc: tag svc_serv with rpc_pipefs mount point Date: Fri, 14 Jan 2011 15:49:02 +0200 Message-ID: <1295012954-7769-5-git-send-email-kas@openvz.org> References: <1295012954-7769-1-git-send-email-kas@openvz.org> Cc: Pavel Emelyanov , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "David S. Miller" , Rob Landley , Al Viro , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Kirill A. Shutemov" To: Trond Myklebust , "J. Bruce Fields" , Neil Brown Return-path: In-Reply-To: <1295012954-7769-1-git-send-email-kas-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org Signed-off-by: Kirill A. Shutemov --- 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 c81d4d8..534ea8e 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 0e659c6..8cc6e79 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -27,6 +28,7 @@ #include #include #include +#include #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.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html