diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2011-12-26 07:39:39 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:24 -0500 |
commit | c21a588f35b1c50304e505fad542b3aab0814266 (patch) | |
tree | 2dda83e8d5f62eb9892c425941265aeeb278e952 /include/linux/sunrpc | |
parent | 90c4e82999c517e0cd00d0782c68d186cb18b784 (diff) |
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 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index 2f3382230141..c13fca34dc9c 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -53,6 +53,9 @@ enum { | |||
53 | 53 | ||
54 | extern struct dentry *rpc_d_lookup_sb(const struct super_block *sb, | 54 | extern struct dentry *rpc_d_lookup_sb(const struct super_block *sb, |
55 | const unsigned char *dir_name); | 55 | const unsigned char *dir_name); |
56 | extern void rpc_pipefs_init_net(struct net *net); | ||
57 | extern struct super_block *rpc_get_sb_net(const struct net *net); | ||
58 | extern void rpc_put_sb_net(const struct net *net); | ||
56 | 59 | ||
57 | extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *, | 60 | extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *, |
58 | char __user *, size_t); | 61 | char __user *, size_t); |