aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index a2b1af89ca1a..adffe1615c51 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -300,7 +300,10 @@ static const struct super_operations nfs4_sops = {
300}; 300};
301#endif 301#endif
302 302
303static struct shrinker *acl_shrinker; 303static struct shrinker acl_shrinker = {
304 .shrink = nfs_access_cache_shrinker,
305 .seeks = DEFAULT_SEEKS,
306};
304 307
305/* 308/*
306 * Register the NFS filesystems 309 * Register the NFS filesystems
@@ -321,7 +324,7 @@ int __init register_nfs_fs(void)
321 if (ret < 0) 324 if (ret < 0)
322 goto error_2; 325 goto error_2;
323#endif 326#endif
324 acl_shrinker = set_shrinker(DEFAULT_SEEKS, nfs_access_cache_shrinker); 327 register_shrinker(&acl_shrinker);
325 return 0; 328 return 0;
326 329
327#ifdef CONFIG_NFS_V4 330#ifdef CONFIG_NFS_V4
@@ -339,8 +342,7 @@ error_0:
339 */ 342 */
340void __exit unregister_nfs_fs(void) 343void __exit unregister_nfs_fs(void)
341{ 344{
342 if (acl_shrinker != NULL) 345 unregister_shrinker(&acl_shrinker);
343 remove_shrinker(acl_shrinker);
344#ifdef CONFIG_NFS_V4 346#ifdef CONFIG_NFS_V4
345 unregister_filesystem(&nfs4_fs_type); 347 unregister_filesystem(&nfs4_fs_type);
346 nfs_unregister_sysctl(); 348 nfs_unregister_sysctl();