mm: hugetlb: change to return bool for isolate_hugetlb()
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Wed, 15 Feb 2023 10:39:36 +0000 (18:39 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Feb 2023 20:46:17 +0000 (12:46 -0800)
commit9747b9e92418b61c2281561e0651803f1fad0159
tree44c7ff35ae3305863b4708818a8b91704d69ff91
parentf7f9c00dfafffd7a5a1a5685e2d874c64913e2ed
mm: hugetlb: change to return bool for isolate_hugetlb()

Now the isolate_hugetlb() only returns 0 or -EBUSY, and most users did not
care about the negative value, thus we can convert the isolate_hugetlb()
to return a boolean value to make code more clear when checking the
hugetlb isolation state.  Moreover converts 2 users which will consider
the negative value returned by isolate_hugetlb().

No functional changes intended.

[akpm@linux-foundation.org: shorten locked section, per SeongJae Park]
Link: https://lkml.kernel.org/r/12a287c5bebc13df304387087bbecc6421510849.1676424378.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/hugetlb.h
mm/hugetlb.c
mm/memory-failure.c
mm/mempolicy.c
mm/migrate.c