1 From 0693bc9ce2cc4f6a1b9c3c05790fc149a74c0b87 Mon Sep 17 00:00:00 2001
2 From: Andrea Arcangeli <aarcange@redhat.com>
3 Date: Wed, 2 Nov 2011 13:37:28 -0700
4 Subject: s390: gup_huge_pmd() return 0 if pte changes
6 From: Andrea Arcangeli <aarcange@redhat.com>
8 commit 0693bc9ce2cc4f6a1b9c3c05790fc149a74c0b87 upstream.
10 s390 didn't return 0 in that case, if it's rolling back the *nr pointer it
11 should also return zero to avoid adding pages to the array at the wrong
14 Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
15 Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
16 Cc: Hugh Dickins <hughd@google.com>
17 Cc: Johannes Weiner <jweiner@redhat.com>
18 Cc: Rik van Riel <riel@redhat.com>
19 Cc: Mel Gorman <mgorman@suse.de>
20 Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
21 Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
22 Cc: David Gibson <david@gibson.dropbear.id.au>
23 Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
24 Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
25 Cc: David Miller <davem@davemloft.net>
26 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
27 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
31 arch/s390/mm/gup.c | 21 +++++++++++----------
32 1 file changed, 11 insertions(+), 10 deletions(-)
34 --- a/arch/s390/mm/gup.c
35 +++ b/arch/s390/mm/gup.c
36 @@ -93,16 +93,17 @@ static inline int gup_huge_pmd(pmd_t *pm
42 - * Any tail page need their mapcount reference taken
47 - get_huge_page_tail(tail);
54 + * Any tail page need their mapcount reference taken before we
59 + get_huge_page_tail(tail);