summaryrefslogtreecommitdiff
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-02-11 02:34:48 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-02-11 02:34:48 +0300
commitf67d6b26649379f8520abe6a6c7ed335310bf01e (patch)
treec161fce6517753dcacdcea21804f6e2c90164a33 /mm/vmscan.c
parent223ec6ab265ead0b319bc2f15d0d1be05078a74b (diff)
parentce4d9a1ea35ac5429e822c4106cb2859d5c71f3e (diff)
downloadlinux-f67d6b26649379f8520abe6a6c7ed335310bf01e.tar.xz
Merge branch 'mm-hotfixes-stable' into mm-stable
To pick up depended-upon changes
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index ac51150d2d36..d4b9fd1ae0ed 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -747,6 +747,8 @@ EXPORT_SYMBOL(register_shrinker);
*/
void unregister_shrinker(struct shrinker *shrinker)
{
+ struct dentry *debugfs_entry;
+
if (!(shrinker->flags & SHRINKER_REGISTERED))
return;
@@ -755,9 +757,11 @@ void unregister_shrinker(struct shrinker *shrinker)
shrinker->flags &= ~SHRINKER_REGISTERED;
if (shrinker->flags & SHRINKER_MEMCG_AWARE)
unregister_memcg_shrinker(shrinker);
- shrinker_debugfs_remove(shrinker);
+ debugfs_entry = shrinker_debugfs_remove(shrinker);
up_write(&shrinker_rwsem);
+ debugfs_remove_recursive(debugfs_entry);
+
kfree(shrinker->nr_deferred);
shrinker->nr_deferred = NULL;
}