Skip to content

Commit 3bfcd13

Browse files
aarcange-rhtorvalds
authored andcommitted
mm: hugetlbfs: use __compound_tail_refcounted in __get_page_tail too
Also remove hugetlb.h which isn't needed anymore as PageHeadHuge is handled in mm.h. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: Khalid Aziz <khalid.aziz@oracle.com> Cc: Pravin Shelar <pshelar@nicira.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Christoph Lameter <cl@linux.com> Cc: Johannes Weiner <jweiner@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 44518d2 commit 3bfcd13

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎mm/swap.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <linux/memcontrol.h>
3232
#include <linux/gfp.h>
3333
#include <linux/uio.h>
34-
#include <linux/hugetlb.h>
3534

3635
#include "internal.h"
3736

@@ -261,7 +260,7 @@ bool __get_page_tail(struct page *page)
261260
struct page *page_head = compound_trans_head(page);
262261

263262
/* Ref to put_compound_page() comment. */
264-
if (PageSlab(page_head) || PageHeadHuge(page_head)) {
263+
if (!__compound_tail_refcounted(page_head)) {
265264
smp_rmb();
266265
if (likely(PageTail(page))) {
267266
/*

0 commit comments

Comments
 (0)