mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 23:12:03 +00:00
vfio: vfio_pci_nvlink2: use mmgrab
Mmgrab was introduced in commit f1f1007644
("mm: add new mmgrab()
helper") and most of the kernel was updated to use it. Update a
remaining file.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
<smpl>
@@ expression e; @@
- atomic_inc(&e->mm_count);
+ mmgrab(e);
</smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
338b4e10f9
commit
bb3d3cf928
@ -161,7 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev,
|
||||
data->useraddr = vma->vm_start;
|
||||
data->mm = current->mm;
|
||||
|
||||
atomic_inc(&data->mm->mm_count);
|
||||
mmgrab(data->mm);
|
||||
ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
|
||||
vma_pages(vma), data->gpu_hpa, &data->mem);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user