Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-4.11b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fix from Juergen Gross:
"A minor fix for using the appropriate refcount_t instead of atomic_t"

* tag 'for-linus-4.11b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
drivers, xen: convert grant_map.users from atomic_t to refcount_t

+6 -5
+6 -5
drivers/xen/gntdev.c
··· 36 36 #include <linux/spinlock.h> 37 37 #include <linux/slab.h> 38 38 #include <linux/highmem.h> 39 + #include <linux/refcount.h> 39 40 40 41 #include <xen/xen.h> 41 42 #include <xen/grant_table.h> ··· 87 86 int index; 88 87 int count; 89 88 int flags; 90 - atomic_t users; 89 + refcount_t users; 91 90 struct unmap_notify notify; 92 91 struct ioctl_gntdev_grant_ref *grants; 93 92 struct gnttab_map_grant_ref *map_ops; ··· 167 166 168 167 add->index = 0; 169 168 add->count = count; 170 - atomic_set(&add->users, 1); 169 + refcount_set(&add->users, 1); 171 170 172 171 return add; 173 172 ··· 213 212 if (!map) 214 213 return; 215 214 216 - if (!atomic_dec_and_test(&map->users)) 215 + if (!refcount_dec_and_test(&map->users)) 217 216 return; 218 217 219 218 atomic_sub(map->count, &pages_mapped); ··· 401 400 struct grant_map *map = vma->vm_private_data; 402 401 403 402 pr_debug("gntdev_vma_open %p\n", vma); 404 - atomic_inc(&map->users); 403 + refcount_inc(&map->users); 405 404 } 406 405 407 406 static void gntdev_vma_close(struct vm_area_struct *vma) ··· 1005 1004 goto unlock_out; 1006 1005 } 1007 1006 1008 - atomic_inc(&map->users); 1007 + refcount_inc(&map->users); 1009 1008 1010 1009 vma->vm_ops = &gntdev_vmops; 1011 1010