]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlbfs: make hugepage size conversion more readable
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 24 Feb 2021 20:10:14 +0000 (12:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:35 +0000 (13:38 -0800)
commit950706bea5d8fefdf8847c6b4366fa67b963fd8c
tree08956ce1596f3960a428aacd08459aa5c2a6400f
parent511970f92f96fe17a0a608f4a7c4cdc6ddb5d2ff
hugetlbfs: make hugepage size conversion more readable

The calculation 1U << (h->order + PAGE_SHIFT - 10) is actually equal to
(PAGE_SHIFT << (h->order)) >> 10.  So we can make it more readable by
replace it with huge_page_size(h) >> 10.

Link: https://lkml.kernel.org/r/20210122083141.24548-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hugetlbfs/inode.c