Re: [PATCH v5 07/17] mm: pgtable: introduce pagetable_dtor()

2025-01-08 Thread Alexander Gordeev
On Wed, Jan 08, 2025 at 02:57:23PM +0800, Qi Zheng wrote: > The pagetable_p*_dtor() are exactly the same except for the handling of > ptlock. If we make ptlock_free() handle the case where ptdesc->ptl is > NULL and remove VM_BUG_ON_PAGE() from pmd_ptlock_free(), we can unify > pagetable_p*_dtor() i

[PATCH v5 07/17] mm: pgtable: introduce pagetable_dtor()

2025-01-07 Thread Qi Zheng
The pagetable_p*_dtor() are exactly the same except for the handling of ptlock. If we make ptlock_free() handle the case where ptdesc->ptl is NULL and remove VM_BUG_ON_PAGE() from pmd_ptlock_free(), we can unify pagetable_p*_dtor() into one function. Let's introduce pagetable_dtor() to do this. La