mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
NFS: remove RPC PipeFS mount point references from NFS cache routines
This is a cleanup patch. We don't need this reference anymore, because DNS resolver cache now creates it's dentries in per-net operations and on PipeFS mount/umount notification. Note that nfs_cache_register_net() now returns 0 instead of -ENOENT in case of PiepFS superblock absence. This is ok, Dns resolver cache will be regestered on PipeFS mount event. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
9df69c81b4
commit
39cb67b9a0
1 changed files with 4 additions and 15 deletions
|
@ -126,24 +126,14 @@ int nfs_cache_register_sb(struct super_block *sb, struct cache_detail *cd)
|
||||||
|
|
||||||
int nfs_cache_register_net(struct net *net, struct cache_detail *cd)
|
int nfs_cache_register_net(struct net *net, struct cache_detail *cd)
|
||||||
{
|
{
|
||||||
struct vfsmount *mnt;
|
|
||||||
struct super_block *pipefs_sb;
|
struct super_block *pipefs_sb;
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
mnt = rpc_get_mount();
|
|
||||||
if (IS_ERR(mnt))
|
|
||||||
return PTR_ERR(mnt);
|
|
||||||
pipefs_sb = rpc_get_sb_net(net);
|
pipefs_sb = rpc_get_sb_net(net);
|
||||||
if (!pipefs_sb) {
|
if (pipefs_sb) {
|
||||||
ret = -ENOENT;
|
ret = nfs_cache_register_sb(pipefs_sb, cd);
|
||||||
goto err;
|
rpc_put_sb_net(net);
|
||||||
}
|
}
|
||||||
ret = nfs_cache_register_sb(pipefs_sb, cd);
|
|
||||||
rpc_put_sb_net(net);
|
|
||||||
if (!ret)
|
|
||||||
return ret;
|
|
||||||
err:
|
|
||||||
rpc_put_mount();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +152,6 @@ void nfs_cache_unregister_net(struct net *net, struct cache_detail *cd)
|
||||||
nfs_cache_unregister_sb(pipefs_sb, cd);
|
nfs_cache_unregister_sb(pipefs_sb, cd);
|
||||||
rpc_put_sb_net(net);
|
rpc_put_sb_net(net);
|
||||||
}
|
}
|
||||||
rpc_put_mount();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nfs_cache_init(struct cache_detail *cd)
|
void nfs_cache_init(struct cache_detail *cd)
|
||||||
|
|
Loading…
Add table
Reference in a new issue