]> git.baikalelectronics.ru Git - kernel.git/commit
mm/hugeltb: simplify the return code of __vma_reservation_common()
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 5 May 2021 01:34:32 +0000 (18:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:21 +0000 (11:27 -0700)
commit5af63732d969e5c09d437e5caa7bde557fb4a5eb
treec3e80f6339fbac79d41271b8022c6b7891280e82
parent103c6abbdb3a00d0287f61e413f25a99280b77c4
mm/hugeltb: simplify the return code of __vma_reservation_common()

It's guaranteed that the vma is associated with a resv_map, i.e.  either
VM_MAYSHARE or HPAGE_RESV_OWNER, when the code reaches here or we would
have returned via !resv check above.  So it's unneeded to check whether
HPAGE_RESV_OWNER is set here.  Simplify the return code to make it more
clear.

Link: https://lkml.kernel.org/r/20210410072348.20437-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Feilong Lin <linfeilong@huawei.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c