On Fri, Nov 01, 2019 at 02:42:21PM -0300, Jason Gunthorpe wrote:
> On Fri, Nov 01, 2019 at 03:59:26PM +0000, Yang, Philip wrote:
> > > This test for range_blockable should be before mutex_lock, I can move
> > > it up
> > > 
> > yes, thanks.
> 
> Okay, I wrote it like this:
> 
>       if (mmu_notifier_range_blockable(range))
>               mutex_lock(&adev->notifier_lock);
>       else if (!mutex_trylock(&adev->notifier_lock))
>               return false;

Never mind, this routine sleeps for other reasons it should just be as
it was:

        if (!mmu_notifier_range_blockable(range))
                return false;

        mutex_lock(&adev->notifier_lock);

Jason
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to