lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -mm 2/7] mm: thp: change __get_page_tail() to use __put_nontail_page()
__get_page_tail() can use __put_nontail_page() instead of put_page()
if it races with split_huge_page(). This is what put_compound_page()
does, so this is equally safe. And this allows us to factor out this
code later.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
mm/swap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/swap.c b/mm/swap.c
index f83de1f..aae24fe 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -289,7 +289,7 @@ bool __get_page_tail(struct page *page)
}
compound_unlock_irqrestore(page_head, flags);
if (unlikely(!got))
- put_page(page_head);
+ __put_nontail_page(page_head);
}
return got;
}
--
1.5.5.1


\
 
 \ /
  Last update: 2013-12-19 05:41    [W:0.166 / U:3.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site