From patchwork Mon Dec 20 11:54:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A. Shutemov" X-Patchwork-Id: 420311 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBKBt1ip005358 for ; Mon, 20 Dec 2010 11:55:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757457Ab0LTLyo (ORCPT ); Mon, 20 Dec 2010 06:54:44 -0500 Received: from shutemov.name ([188.40.19.243]:38444 "EHLO shutemov.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757268Ab0LTLyl (ORCPT ); Mon, 20 Dec 2010 06:54:41 -0500 Received: by shutemov.name (Postfix, from userid 500) id 1167ED4216; Mon, 20 Dec 2010 13:54:41 +0200 (EET) From: "Kirill A. Shutsemov" To: Trond Myklebust , "J. Bruce Fields" , Neil Brown Cc: Pavel Emelyanov , linux-nfs@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH 04/12] sunrpc: tag svc_serv with rpc_pipefs mount point Date: Mon, 20 Dec 2010 13:54:30 +0200 Message-Id: <1292846078-31793-5-git-send-email-kirill@shutemov.name> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1292846078-31793-1-git-send-email-kirill@shutemov.name> References: <1292846078-31793-1-git-send-email-kirill@shutemov.name> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 20 Dec 2010 11:55:03 +0000 (UTC) diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 5a3085b..3b6b26c 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 6359c42..d2f7c03 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) @@ -492,6 +495,7 @@ svc_destroy(struct svc_serv *serv) svc_sock_destroy(serv->bc_xprt); #endif /* CONFIG_NFS_V4_1 */ + mntput(serv->sv_rpcmount); svc_unregister(serv); kfree(serv->sv_pools); kfree(serv);