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>
This commit is contained in:
Stanislav Kinsbursky
2011-12-26 15:39:39 +03:00
committed by Trond Myklebust
parent 90c4e82999
commit c21a588f35
4 changed files with 41 additions and 0 deletions

View File

@@ -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;