summaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/rpc_pipe_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust2013-08-27 22:27:04 +0200
committerTrond Myklebust2013-09-01 17:12:43 +0200
commit298fc3558b9c1f5324c5ec6d5c587ca9ae6cc826 (patch)
tree2dd0fde31f3a0178eb47e53bdb4ed86878159d17 /include/linux/sunrpc/rpc_pipe_fs.h
parentSUNRPC: Remove the rpc_client->cl_dentry (diff)
downloadkernel-qcow2-linux-298fc3558b9c1f5324c5ec6d5c587ca9ae6cc826.tar.gz
kernel-qcow2-linux-298fc3558b9c1f5324c5ec6d5c587ca9ae6cc826.tar.xz
kernel-qcow2-linux-298fc3558b9c1f5324c5ec6d5c587ca9ae6cc826.zip
SUNRPC: Add a helper to allow sharing of rpc_pipefs directory objects
Add support for looking up existing objects and creating new ones if there is no match. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/rpc_pipe_fs.h')
-rw-r--r--include/linux/sunrpc/rpc_pipe_fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
index b0cf1812be72..a353e0300b54 100644
--- a/include/linux/sunrpc/rpc_pipe_fs.h
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
@@ -106,6 +106,12 @@ extern int rpc_add_pipe_dir_object(struct net *net,
extern void rpc_remove_pipe_dir_object(struct net *net,
struct rpc_pipe_dir_head *pdh,
struct rpc_pipe_dir_object *pdo);
+extern struct rpc_pipe_dir_object *rpc_find_or_alloc_pipe_dir_object(
+ struct net *net,
+ struct rpc_pipe_dir_head *pdh,
+ int (*match)(struct rpc_pipe_dir_object *, void *),
+ struct rpc_pipe_dir_object *(*alloc)(void *),
+ void *data);
struct cache_detail;
extern struct dentry *rpc_create_cache_dir(struct dentry *,