[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1489365353-28205-4-git-send-email-minchan@kernel.org>
Date: Mon, 13 Mar 2017 09:35:46 +0900
From: Minchan Kim <minchan@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<kernel-team@....com>, Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
Minchan Kim <minchan@...nel.org>
Subject: [PATCH v1 03/10] 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 <minchan@...nel.org>
---
mm/rmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index d47af09..1cfb3a3 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1530,7 +1530,7 @@ int try_to_unmap(struct page *page, enum ttu_flags flags)
else
ret = rmap_walk(page, &rwc);
- if (ret != SWAP_MLOCK && !page_mapcount(page))
+ if (!page_mapcount(page))
ret = SWAP_SUCCESS;
return ret;
}
--
2.7.4
Powered by blists - more mailing lists