summaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 7527afd95284..627b16aed1dc 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3784,6 +3784,9 @@ void cgroup_throttle_swaprate(struct page *page, gfp_t gfp_mask)
struct swap_info_struct *si, *next;
int nid = page_to_nid(page);
+ if (mem_cgroup_disabled())
+ return;
+
if (!(gfp_mask & __GFP_IO))
return;