Looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx> One comment on a related cleanup: > list_for_each_entry(mirror, &hmm->mirrors, list) { > int rc; > > - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update); > + rc = mirror->ops->sync_cpu_device_pagetables(mirror, nrange); > if (rc) { > - if (WARN_ON(update.blockable || rc != -EAGAIN)) > + if (WARN_ON(mmu_notifier_range_blockable(nrange) || > + rc != -EAGAIN)) > continue; > ret = -EAGAIN; > break; This magic handling of error seems odd. I think we should merge rc and ret into one variable and just break out if any error happens instead or claiming in the comments -EAGAIN is the only valid error and then ignoring all others here.