aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mlock.c')
-rw-r--r--mm/mlock.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index 0dd9ca18e19e..c483c5c20b4b 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -123,17 +123,15 @@ static bool __munlock_isolate_lru_page(struct page *page, bool getpage)
123 */ 123 */
124static void __munlock_isolated_page(struct page *page) 124static void __munlock_isolated_page(struct page *page)
125{ 125{
126 int ret = SWAP_AGAIN;
127
128 /* 126 /*
129 * Optimization: if the page was mapped just once, that's our mapping 127 * Optimization: if the page was mapped just once, that's our mapping
130 * and we don't need to check all the other vmas. 128 * and we don't need to check all the other vmas.
131 */ 129 */
132 if (page_mapcount(page) > 1) 130 if (page_mapcount(page) > 1)
133 ret = try_to_munlock(page); 131 try_to_munlock(page);
134 132
135 /* Did try_to_unlock() succeed or punt? */ 133 /* Did try_to_unlock() succeed or punt? */
136 if (ret != SWAP_MLOCK) 134 if (!PageMlocked(page))
137 count_vm_event(UNEVICTABLE_PGMUNLOCKED); 135 count_vm_event(UNEVICTABLE_PGMUNLOCKED);
138 136
139 putback_lru_page(page); 137 putback_lru_page(page);