Re: [PATCH] mm/mmu_notifiers: use helper function mmu_notifier_synchronize()

From: Jason Gunthorpe
Date: Thu Feb 17 2022 - 10:51:39 EST


On Thu, Feb 17, 2022 at 07:09:48PM +0800, Miaohe Lin wrote:
> Use helper function mmu_notifier_synchronize() to ensure all mmu_notifiers
> are freed. Minor readability improvement.
>
> Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
> ---
> mm/mmu_notifier.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)

I'm not keen on this, the internal synchronize_srcu's don't have the
same usage model as described in the comment for
mmu_notifier_synchronize(). Instead they are doing what their comments
say.

Yes, it is the same code, but the purpose is different.

Jason