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>
This commit is contained in:
parent
c36dcfe1f7
commit
298fc3558b
2 changed files with 41 additions and 0 deletions
|
@ -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 *,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue