vfio/spapr_tce: use mmgrab
authorJulia Lawall <Julia.Lawall@inria.fr>
Sun, 29 Dec 2019 15:42:57 +0000 (16:42 +0100)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 7 Jan 2020 20:03:12 +0000 (13:03 -0700)
commit7a49de995ebbd8711d52d6a3806faa8c5db0eac1
tree0c09a333d625c3ebce85fefe75e7e52211f95bd0
parentbb3d3cf928d4cc450aa817a9c71f4324ec68fd63
vfio/spapr_tce: use mmgrab

Mmgrab was introduced in commit f1f1007644ff ("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>
drivers/vfio/vfio_iommu_spapr_tce.c