mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu
Subsystems (2)
[email protected]
maintainerPATCH 50/102 mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu
From: Minchan Kim <[email protected]>
Subject: mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu
If the page is mapped and rescue in try_to_unmap_one, page_mapcount(page) == 0 cannot be true so page_mapcount check in try_to_unmap is enough to return SWAP_SUCCESS. IOW, SWAP_MLOCK check is redundant so remove it.
Signed-off-by Minchan Kim <[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 Naoya Horiguchi <[email protected]>
Cc Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/rmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/rmap.c renamed from mm/rmap.c~mm-remove-swap_mlock-check-for-swap_success-in-ttu +1 -1
@@ -1535,7 +1535,7 @@ int try_to_unmap(struct page *page, enumelse ret =rmap_walk (page, &rwc); -if (ret !=SWAP_MLOCK && !page_mapcount (page)) +if (!page_mapcount (page)) ret =SWAP_SUCCESS ;return ret; }
_