@@ -1308,13 +1308,6 @@ static struct dentry *nfs4blocklayout_register_sb(struct super_block *sb,
return dentry;
}
-static void nfs4blocklayout_unregister_sb(struct super_block *sb,
- struct rpc_pipe *pipe)
-{
- if (pipe->dentry)
- rpc_unlink(pipe->dentry);
-}
-
static struct dentry *nfs4blocklayout_register_net(struct net *net,
struct rpc_pipe *pipe)
{
@@ -1329,18 +1322,6 @@ static struct dentry *nfs4blocklayout_register_net(struct net *net,
return dentry;
}
-static void nfs4blocklayout_unregister_net(struct net *net,
- struct rpc_pipe *pipe)
-{
- struct super_block *pipefs_sb;
-
- pipefs_sb = rpc_get_sb_net(net);
- if (pipefs_sb) {
- nfs4blocklayout_unregister_sb(pipefs_sb, pipe);
- rpc_put_sb_net(net);
- }
-}
-
static int nfs4blocklayout_net_init(struct net *net)
{
struct nfs_net *nn = net_generic(net, nfs_net_id);
@@ -1363,7 +1344,8 @@ static void nfs4blocklayout_net_exit(struct net *net)
{
struct nfs_net *nn = net_generic(net, nfs_net_id);
- nfs4blocklayout_unregister_net(net, nn->bl_device_pipe);
+ if (nn->bl_device_pipe->dentry)
+ rpc_unlink(nn->bl_device_pipe->dentry);
rpc_destroy_pipe_data(nn->bl_device_pipe);
nn->bl_device_pipe = NULL;
}
@@ -774,13 +774,6 @@ nfsd4_cld_register_sb(struct super_block *sb, struct rpc_pipe *pipe)
return dentry;
}
-static void
-nfsd4_cld_unregister_sb(struct rpc_pipe *pipe)
-{
- if (pipe->dentry)
- rpc_unlink(pipe->dentry);
-}
-
static struct dentry *
nfsd4_cld_register_net(struct net *net, struct rpc_pipe *pipe)
{
@@ -795,18 +788,6 @@ nfsd4_cld_register_net(struct net *net, struct rpc_pipe *pipe)
return dentry;
}
-static void
-nfsd4_cld_unregister_net(struct net *net, struct rpc_pipe *pipe)
-{
- struct super_block *sb;
-
- sb = rpc_get_sb_net(net);
- if (sb) {
- nfsd4_cld_unregister_sb(pipe);
- rpc_put_sb_net(net);
- }
-}
-
/* Initialize rpc_pipefs pipe for communication with client tracking daemon */
static int
nfsd4_init_cld_pipe(struct net *net)
@@ -858,7 +839,8 @@ nfsd4_remove_cld_pipe(struct net *net)
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
struct cld_net *cn = nn->cld_net;
- nfsd4_cld_unregister_net(net, cn->cn_pipe);
+ if (cn->cn_pipe->dentry)
+ rpc_unlink(cn->cn_pipe->dentry);
rpc_destroy_pipe_data(cn->cn_pipe);
kfree(nn->cld_net);
nn->cld_net = NULL;
It translates to simple dcache operations that have their own synchronization. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/nfs/blocklayout/blocklayout.c | 22 ++-------------------- fs/nfsd/nfs4recover.c | 22 ++-------------------- 2 files changed, 4 insertions(+), 40 deletions(-)