summaryrefslogtreecommitdiff
path: root/linux/shrinker.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/shrinker.c')
-rw-r--r--linux/shrinker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/shrinker.c b/linux/shrinker.c
index 25cdfbb6..0f73620b 100644
--- a/linux/shrinker.c
+++ b/linux/shrinker.c
@@ -88,6 +88,9 @@ void run_shrinkers(gfp_t gfp_mask, bool allocation_failed)
struct sysinfo info;
s64 want_shrink;
+ if (!(gfp_mask & GFP_KERNEL))
+ return;
+
/* Fast out if there are no shrinkers to run. */
if (list_empty(&shrinker_list))
return;