diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |