diff options
Diffstat (limited to 'fs/nfs/cache_lib.c')
| -rw-r--r-- | fs/nfs/cache_lib.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/nfs/cache_lib.c b/fs/nfs/cache_lib.c index 862a2f16db64..5f7b053720ee 100644 --- a/fs/nfs/cache_lib.c +++ b/fs/nfs/cache_lib.c | |||
| @@ -128,10 +128,13 @@ int nfs_cache_register_net(struct net *net, struct cache_detail *cd) | |||
| 128 | struct super_block *pipefs_sb; | 128 | struct super_block *pipefs_sb; |
| 129 | int ret = 0; | 129 | int ret = 0; |
| 130 | 130 | ||
| 131 | sunrpc_init_cache_detail(cd); | ||
| 131 | pipefs_sb = rpc_get_sb_net(net); | 132 | pipefs_sb = rpc_get_sb_net(net); |
| 132 | if (pipefs_sb) { | 133 | if (pipefs_sb) { |
| 133 | ret = nfs_cache_register_sb(pipefs_sb, cd); | 134 | ret = nfs_cache_register_sb(pipefs_sb, cd); |
| 134 | rpc_put_sb_net(net); | 135 | rpc_put_sb_net(net); |
| 136 | if (ret) | ||
| 137 | sunrpc_destroy_cache_detail(cd); | ||
| 135 | } | 138 | } |
| 136 | return ret; | 139 | return ret; |
| 137 | } | 140 | } |
| @@ -151,14 +154,5 @@ void nfs_cache_unregister_net(struct net *net, struct cache_detail *cd) | |||
| 151 | nfs_cache_unregister_sb(pipefs_sb, cd); | 154 | nfs_cache_unregister_sb(pipefs_sb, cd); |
| 152 | rpc_put_sb_net(net); | 155 | rpc_put_sb_net(net); |
| 153 | } | 156 | } |
| 154 | } | ||
| 155 | |||
| 156 | void nfs_cache_init(struct cache_detail *cd) | ||
| 157 | { | ||
| 158 | sunrpc_init_cache_detail(cd); | ||
| 159 | } | ||
| 160 | |||
| 161 | void nfs_cache_destroy(struct cache_detail *cd) | ||
| 162 | { | ||
| 163 | sunrpc_destroy_cache_detail(cd); | 157 | sunrpc_destroy_cache_detail(cd); |
| 164 | } | 158 | } |
