]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-hugetlb-cleanup-using-pagehugeactive-flag-fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 7 Apr 2015 23:44:34 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:34 +0000 (09:44 +1000)
s/PageHugeActive/page_huge_active/

Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/hugetlb.h
include/linux/page-flags.h
mm/hugetlb.c
mm/memory_hotplug.c

index e7f6178b8f49f306ccfb85803d7f5d98b1708501..205026175c4208a8e65423f6042606a5be67bec7 100644 (file)
@@ -44,8 +44,6 @@ extern int hugetlb_max_hstate __read_mostly;
 #define for_each_hstate(h) \
        for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++)
 
-int PageHugeActive(struct page *page);
-
 struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages,
                                                long min_hpages);
 void hugepage_put_subpool(struct hugepage_subpool *spool);
@@ -115,11 +113,6 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma,
 
 #else /* !CONFIG_HUGETLB_PAGE */
 
-static inline int PageHugeActive(struct page *page)
-{
-       return 0;
-}
-
 static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
 {
 }
index e5770201bba7cc544e48d47d36558be72c21fb1f..91b7f9b2b7743367f8eda6939a868cec3bc42278 100644 (file)
@@ -549,11 +549,18 @@ static inline void ClearPageCompound(struct page *page)
 #ifdef CONFIG_HUGETLB_PAGE
 int PageHuge(struct page *page);
 int PageHeadHuge(struct page *page);
+bool page_huge_active(struct page *page);
 #else
 TESTPAGEFLAG_FALSE(Huge)
 TESTPAGEFLAG_FALSE(HeadHuge)
+
+static inline bool page_huge_active(struct page *page)
+{
+       return 0;
+}
 #endif
 
+
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 /*
  * PageHuge() only returns true for hugetlbfs pages, but not for
index 1b1dc7494a3cecedbe4346f92f1a807bc9306be5..e8c92ae35b4b389f8aa581d739f43ffa1406f6bd 100644 (file)
@@ -3909,10 +3909,10 @@ int dequeue_hwpoisoned_huge_page(struct page *hpage)
 
        spin_lock(&hugetlb_lock);
        /*
-        * Just checking !PageHugeActive is not enough, because that could be
+        * Just checking !page_huge_active is not enough, because that could be
         * an isolated/hwpoisoned hugepage (which have >0 refcount).
         */
-       if (!PageHugeActive(hpage) && !page_count(hpage)) {
+       if (!page_huge_active(hpage) && !page_count(hpage)) {
                /*
                 * Hwpoisoned hugepage isn't linked to activelist or freelist,
                 * but dangling hpage->lru can trigger list-debug warnings
index 113538a2e965d8587d023b4b8c0d79d481aa28f5..457bde530cbedcf0dea2f35e219466de0acf204d 100644 (file)
@@ -1373,7 +1373,7 @@ static unsigned long scan_movable_pages(unsigned long start, unsigned long end)
                        if (PageLRU(page))
                                return pfn;
                        if (PageHuge(page)) {
-                               if (PageHugeActive(page))
+                               if (page_huge_active(page))
                                        return pfn;
                                else
                                        pfn = round_up(pfn + 1,