mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm: make ttu's return boolean
try_to_unmap() returns SWAP_SUCCESS or SWAP_FAIL so it's suitable for boolean return. This patch changes it. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Minchan Kim <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Anshuman Khandual <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
33fc80e257
commit
666e5a406c
5 changed files with 21 additions and 30 deletions
|
|
@ -972,7 +972,6 @@ static unsigned long shrink_page_list(struct list_head *page_list,
|
|||
int may_enter_fs;
|
||||
enum page_references references = PAGEREF_RECLAIM_CLEAN;
|
||||
bool dirty, writeback;
|
||||
int ret = SWAP_SUCCESS;
|
||||
|
||||
cond_resched();
|
||||
|
||||
|
|
@ -1145,13 +1144,9 @@ static unsigned long shrink_page_list(struct list_head *page_list,
|
|||
* processes. Try to unmap it here.
|
||||
*/
|
||||
if (page_mapped(page)) {
|
||||
switch (ret = try_to_unmap(page,
|
||||
ttu_flags | TTU_BATCH_FLUSH)) {
|
||||
case SWAP_FAIL:
|
||||
if (!try_to_unmap(page, ttu_flags | TTU_BATCH_FLUSH)) {
|
||||
nr_unmap_fail++;
|
||||
goto activate_locked;
|
||||
case SWAP_SUCCESS:
|
||||
; /* try to free the page below */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue