mm: thp: make the THP mapcount atomic with a seqlock

Introduce a seqlock in the THP subpage at index 1 to allow reading the
THP mapcount atomically outside the page lock.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Fixes: c444eb564fb1 ("mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()")
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
5 files changed