[PATCH v3 hmm 01/11] mm/mmu_notifiers: hoist do_mmu_notifier_register down_write to the caller

Ralph Campbell rcampbell at nvidia.com
Wed Aug 14 20:14:24 UTC 2019

On 8/6/19 4:15 PM, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg at mellanox.com>
> This simplifies the code to not have so many one line functions and extra
> logic. __mmu_notifier_register() simply becomes the entry point to
> register the notifier, and the other one calls it under lock.
> Also add a lockdep_assert to check that the callers are holding the lock
> as expected.
> Suggested-by: Christoph Hellwig <hch at infradead.org>
> Signed-off-by: Jason Gunthorpe <jgg at mellanox.com>

Nice clean up.
Reviewed-by: Ralph Campbell <rcampbell at nvidia.com>

More information about the amd-gfx mailing list