summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/netns.h
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2011-12-26 13:39:39 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-02-01 00:20:24 +0100
commitc21a588f35b1c50304e505fad542b3aab0814266 (patch)
tree2dda83e8d5f62eb9892c425941265aeeb278e952 /net/sunrpc/netns.h
parentSUNRPC: put pipefs superblock link on network namespace (diff)
downloadlinux-c21a588f35b1c50304e505fad542b3aab0814266.tar.xz
linux-c21a588f35b1c50304e505fad542b3aab0814266.zip
SUNRPC: pipefs per-net operations helper introduced
During per-net pipes creation and destruction we have to make sure, that pipefs sb exists for the whole creation/destruction cycle. This is done by using special mutex which controls pipefs sb reference on network namespace context. Helper consists of two parts: first of them (rpc_get_dentry_net) searches for dentry with specified name and returns with mutex taken on success. When pipe creation or destructions is completed, caller should release this mutex by rpc_put_dentry_net call. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/netns.h')
-rw-r--r--net/sunrpc/netns.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/netns.h b/net/sunrpc/netns.h
index b3842529aec9..11d2f4863403 100644
--- a/net/sunrpc/netns.h
+++ b/net/sunrpc/netns.h
@@ -11,6 +11,7 @@ struct sunrpc_net {
struct cache_detail *ip_map_cache;
struct super_block *pipefs_sb;
+ struct mutex pipefs_sb_lock;
};
extern int sunrpc_net_id;