On 5 Jun 2026, at 12:14, Nico Pache wrote: > Currently the collapse_huge_page function requires the mmap_read_lock to > enter with it held, and exit with it dropped. This function moves the > unlock into its parent caller, and changes this semantic to requiring it > to enter/exit with it always unlocked. > > In future patches, we need this expectation, as for in mTHP collapse, we > may have already dropped the lock, and do not want to conditionally > check for this by passing through the lock_dropped variable. > > No functional change is expected as one of the first things the > collapse_huge_page function does is drop this lock before allocating the > hugepage. > > Reviewed-by: Lorenzo Stoakes <[email protected]> > Acked-by: David Hildenbrand (Arm) <[email protected]> > Signed-off-by: Nico Pache <[email protected]> > --- > mm/khugepaged.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > LGTM.
Reviewed-by: Zi Yan <[email protected]> Best Regards, Yan, Zi
