mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Revert "kernel5.4: mm zram:free the swap slot when swap in"
Reason, the changes may cause panic problem Fix, revert the change This reverts commit 147db8784085f8456da0c2870e626da4c25f1778. Change-Id: Ia4cfda84125c5d06af363e6a2d685d0c94c26c5f Reviewed-on: https://gerrit.mot.com/1930858 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Zhizhong Ge <gezz1@motorola.com> Reviewed-by: Zhangqing Huang <huangzq2@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Reviewed-by: Zhongsheng Xia <xiazs1@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
7bbd9267e3
commit
0ad3cfe7d0
1 changed files with 5 additions and 6 deletions
11
mm/page_io.c
11
mm/page_io.c
|
|
@ -398,12 +398,11 @@ int swap_readpage(struct page *page, bool synchronous)
|
|||
|
||||
ret = bdev_read_page(sis->bdev, swap_page_sector(page), page);
|
||||
if (!ret) {
|
||||
/*
|
||||
* Moto huangzq2: We either remove the trylock_page or use lock_page
|
||||
* here, becuase trylock will always return false due to page_endio
|
||||
* in zram_rw_page.
|
||||
*/
|
||||
swap_slot_free_notify(page);
|
||||
if (trylock_page(page)) {
|
||||
swap_slot_free_notify(page);
|
||||
unlock_page(page);
|
||||
}
|
||||
|
||||
count_vm_event(PSWPIN);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue