aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 883e98f..e76f74e 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1060,8 +1060,17 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
info = SHMEM_I(inode);
if (info->flags & VM_LOCKED)
goto redirty;
+#ifdef CONFIG_ZRAM_FOR_ANDROID
+ /*
+ * Modification for compcache
+ * shmem_writepage can be reason of kernel panic when using swap.
+ * This modification prevent using swap by shmem.
+ */
+ goto redirty;
+#else
if (!total_swap_pages)
goto redirty;
+#endif
/*
* shmem_backing_dev_info's capabilities prevent regular writeback or