diff options
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c index 47b87b071de3..320e088d0b28 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -462,6 +462,11 @@ static int shrink_icache_memory(int nr, gfp_t gfp_mask) | |||
462 | return (inodes_stat.nr_unused / 100) * sysctl_vfs_cache_pressure; | 462 | return (inodes_stat.nr_unused / 100) * sysctl_vfs_cache_pressure; |
463 | } | 463 | } |
464 | 464 | ||
465 | static struct shrinker icache_shrinker = { | ||
466 | .shrink = shrink_icache_memory, | ||
467 | .seeks = DEFAULT_SEEKS, | ||
468 | }; | ||
469 | |||
465 | static void __wait_on_freeing_inode(struct inode *inode); | 470 | static void __wait_on_freeing_inode(struct inode *inode); |
466 | /* | 471 | /* |
467 | * Called with the inode lock held. | 472 | * Called with the inode lock held. |
@@ -1385,7 +1390,7 @@ void __init inode_init(unsigned long mempages) | |||
1385 | SLAB_MEM_SPREAD), | 1390 | SLAB_MEM_SPREAD), |
1386 | init_once, | 1391 | init_once, |
1387 | NULL); | 1392 | NULL); |
1388 | set_shrinker(DEFAULT_SEEKS, shrink_icache_memory); | 1393 | register_shrinker(&icache_shrinker); |
1389 | 1394 | ||
1390 | /* Hash may have been set up in inode_init_early */ | 1395 | /* Hash may have been set up in inode_init_early */ |
1391 | if (!hashdist) | 1396 | if (!hashdist) |