]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlb: remove redundant validation in has_same_uncharge_info()
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Fri, 5 Nov 2021 20:41:58 +0000 (13:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:39 +0000 (13:30 -0700)
commit1627d0fa63bf9ba627529a1cd37050bbb1daa5ef
tree2e7b944df7c7188066e97f8013a12c13671ee63d
parenta32b11069b2073d5d06abf5665150f8e9dc7ed9b
hugetlb: remove redundant validation in has_same_uncharge_info()

The callers of has_same_uncharge_info() has accessed the original
file_region and new file_region, and they are impossible to be NULL now.

So we can remove the file_region validation in has_same_uncharge_info()
to simplify the code.

Link: https://lkml.kernel.org/r/97fc68d3f8d34f63c204645e10d7a718997e50b7.1634797639.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c