diff options
author | Tim Chase <[email protected]> | 2014-12-18 10:08:47 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-01-20 14:07:59 -0800 |
commit | 3c832b8cc13bb4e570b317c30b146bb072e08f58 (patch) | |
tree | be0f5c00b2084505a7028c3474c5a845cfb92a27 /module/zfs/zpl_super.c | |
parent | 6e9710f7c33a7440904b39fb4e6b68b3325cfeca (diff) |
Linux 3.12 compat: split shrinker has s_shrink
The split count/scan shrinker callbacks introduced in 3.12 broke the
test for HAVE_SHRINK, effectively disabling the per-superblock shrinkers.
This patch re-enables the per-superblock shrinkers when the split shrinker
callbacks have been detected.
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2975
Diffstat (limited to 'module/zfs/zpl_super.c')
-rw-r--r-- | module/zfs/zpl_super.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c index 410030461..aa234bcff 100644 --- a/module/zfs/zpl_super.c +++ b/module/zfs/zpl_super.c @@ -268,7 +268,7 @@ zpl_kill_sb(struct super_block *sb) #endif /* HAVE_S_INSTANCES_LIST_HEAD */ } -#ifdef HAVE_SHRINK +#if defined(HAVE_SHRINK) || defined(HAVE_SPLIT_SHRINKER_CALLBACK) /* * Linux 3.1 - 3.x API * @@ -288,17 +288,17 @@ zpl_prune_sb(struct super_block *sb, void *arg) error = -zfs_sb_prune(sb, *(unsigned long *)arg, &objects); ASSERT3S(error, <=, 0); } -#endif /* HAVE_SHRINK */ +#endif /* defined(HAVE_SHRINK) || defined(HAVE_SPLIT_SHRINKER_CALLBACK) */ void zpl_prune_sbs(int64_t bytes_to_scan, void *private) { -#ifdef HAVE_SHRINK +#if defined(HAVE_SHRINK) || defined(HAVE_SPLIT_SHRINKER_CALLBACK) unsigned long nr_to_scan = (bytes_to_scan / sizeof (znode_t)); iterate_supers_type(&zpl_fs_type, zpl_prune_sb, &nr_to_scan); kmem_reap(); -#endif /* HAVE_SHRINK */ +#endif /* defined(HAVE_SHRINK) || defined(HAVE_SPLIT_SHRINKER_CALLBACK) */ } #ifdef HAVE_NR_CACHED_OBJECTS |