From patchwork Tue Feb 8 18:41:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A. Shutemov" X-Patchwork-Id: 541421 X-Patchwork-Delegate: Trond.Myklebust@netapp.com 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 p18IiDqm021135 for ; Tue, 8 Feb 2011 18:44:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755304Ab1BHSmM (ORCPT ); Tue, 8 Feb 2011 13:42:12 -0500 Received: from shutemov.name ([188.40.19.243]:48849 "EHLO shutemov.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755465Ab1BHSmJ (ORCPT ); Tue, 8 Feb 2011 13:42:09 -0500 Received: by shutemov.name (Postfix, from userid 500) id E056BD4217; Tue, 8 Feb 2011 20:42:08 +0200 (EET) From: "Kirill A. Shutemov" To: Trond Myklebust , "J. Bruce Fields" , Neil Brown Cc: Pavel Emelyanov , linux-nfs@vger.kernel.org, "David S. Miller" , Rob Landley , Al Viro , containers@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH v3, RESEND 04/16] sunrpc: tag svc_serv with rpc_pipefs mount point Date: Tue, 8 Feb 2011 20:41:55 +0200 Message-Id: <1297190527-19925-5-git-send-email-kas@openvz.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1297190527-19925-1-git-send-email-kas@openvz.org> References: <1297190527-19925-1-git-send-email-kas@openvz.org> 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 08 Feb 2011 18:44:13 +0000 (UTC) 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 #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);