mm/hugetlb: add missing annotation for gather_surplus_pages()
authorJules Irenge <jbi.octave@gmail.com>
Tue, 7 Apr 2020 03:08:09 +0000 (20:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2020 17:43:41 +0000 (10:43 -0700)
commit1b2a1e7bb9ce9936d6839c1023737ccff7889dee
tree2711723141664410c339abbf3308a807817cafe9
parent77337edee7598d82fb5acf66cb91a5b3f0c46add
mm/hugetlb: add missing annotation for gather_surplus_pages()

Sparse reports a warning at gather_surplus_pages()

warning: context imbalance in hugetlb_cow() - unexpected unlock

The root cause is the missing annotation at gather_surplus_pages()
Add the missing __must_hold(&hugetlb_lock)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Link: http://lkml.kernel.org/r/20200214204741.94112-7-jbi.octave@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c