Netdev List
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: bfields@fieldses.org, Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, xemul@parallels.com, neilb@suse.de,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jbottomley@parallels.com, davem@davemloft.net, devel@openvz.org
Subject: [PATCH 5/6] SUNRPC: remove RPC pipefs mount point manipulations from RPC clients code
Date: Wed, 23 Nov 2011 14:51:56 +0300	[thread overview]
Message-ID: <20111123105156.11077.88391.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20111123104945.11077.10270.stgit@localhost6.localdomain6>

Now, with RPC pipefs mount notifications handling in RPC clients, we can remove
mount point creation and destruction. RPC clients dentries will be created on
PipeFS mount event and removed on umount event.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>

---
 net/sunrpc/clnt.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 23776a4..eb2595f 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -112,7 +112,6 @@ static void rpc_clnt_remove_pipedir(struct rpc_clnt *clnt)
 		__rpc_clnt_remove_pipedir(clnt);
 		rpc_put_sb_net(clnt->cl_xprt->xprt_net);
 	}
-	rpc_put_mount();
 }
 
 static struct dentry *rpc_setup_pipedir_sb(struct super_block *sb,
@@ -158,21 +157,13 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
 	clnt->cl_path.dentry = NULL;
 	if (dir_name == NULL)
 		return 0;
-
-	path.mnt = rpc_get_mount();
-	if (IS_ERR(path.mnt))
-		return PTR_ERR(path.mnt);
 	pipefs_sb = rpc_get_sb_net(clnt->cl_xprt->xprt_net);
-	if (!pipefs_sb) {
-		rpc_put_mount();
-		return -ENOENT;
-	}
+	if (!pipefs_sb)
+		return 0;
 	path.dentry = rpc_setup_pipedir_sb(pipefs_sb, clnt, dir_name);
 	rpc_put_sb_net(clnt->cl_xprt->xprt_net);
-	if (IS_ERR(path.dentry)) {
-		rpc_put_mount();
+	if (IS_ERR(path.dentry))
 		return PTR_ERR(path.dentry);
-	}
 	clnt->cl_path = path;
 	return 0;
 }

  parent reply	other threads:[~2011-11-23 11:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 11:51 [PATCH 0/6] SUNRPC: make RPC clients use network-namespace-aware PipeFS routines Stanislav Kinsbursky
2011-11-23 11:51 ` [PATCH 1/6] SUNRPC: handle RPC client pipefs dentries by network namespace aware routines Stanislav Kinsbursky
2011-11-23 11:51 ` [PATCH 2/6] SUNRPC: handle GSS AUTH pipes " Stanislav Kinsbursky
2011-11-23 11:51 ` [PATCH 3/6] SUNRPC: subscribe RPC clients to pipefs notifications Stanislav Kinsbursky
2011-11-23 11:51 ` [PATCH 4/6] SUNRPC: remove RPC client pipefs dentries after unregister Stanislav Kinsbursky
2011-11-23 11:51 ` Stanislav Kinsbursky [this message]
2011-11-23 11:52 ` [PATCH 6/6] SUNRPC: remove RPC PipeFS mount point reference from RPC client Stanislav Kinsbursky
     [not found] ` <20111123104945.11077.10270.stgit-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2011-11-23 16:27   ` [PATCH 0/6] SUNRPC: make RPC clients use network-namespace-aware PipeFS routines J. Bruce Fields
2011-11-23 17:18     ` Stanislav Kinsbursky
2011-11-24  8:45     ` Stanislav Kinsbursky
2011-11-23 16:36   ` J. Bruce Fields
2011-11-23 17:58     ` Stanislav Kinsbursky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111123105156.11077.88391.stgit@localhost6.localdomain6 \
    --to=skinsbursky@parallels.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=jbottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox