diff options
| -rw-r--r-- | drivers/xen/gntdev.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 75f8037c9833..4ca4262d3d19 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
| @@ -77,7 +77,6 @@ struct grant_map { | |||
| 77 | int index; | 77 | int index; |
| 78 | int count; | 78 | int count; |
| 79 | int flags; | 79 | int flags; |
| 80 | int is_mapped; | ||
| 81 | atomic_t users; | 80 | atomic_t users; |
| 82 | struct unmap_notify notify; | 81 | struct unmap_notify notify; |
| 83 | struct ioctl_gntdev_grant_ref *grants; | 82 | struct ioctl_gntdev_grant_ref *grants; |
| @@ -322,7 +321,6 @@ static void gntdev_vma_close(struct vm_area_struct *vma) | |||
| 322 | struct grant_map *map = vma->vm_private_data; | 321 | struct grant_map *map = vma->vm_private_data; |
| 323 | 322 | ||
| 324 | pr_debug("close %p\n", vma); | 323 | pr_debug("close %p\n", vma); |
| 325 | map->is_mapped = 0; | ||
| 326 | map->vma = NULL; | 324 | map->vma = NULL; |
| 327 | vma->vm_private_data = NULL; | 325 | vma->vm_private_data = NULL; |
| 328 | gntdev_put_map(map); | 326 | gntdev_put_map(map); |
| @@ -347,8 +345,6 @@ static void mn_invl_range_start(struct mmu_notifier *mn, | |||
| 347 | list_for_each_entry(map, &priv->maps, next) { | 345 | list_for_each_entry(map, &priv->maps, next) { |
| 348 | if (!map->vma) | 346 | if (!map->vma) |
| 349 | continue; | 347 | continue; |
| 350 | if (!map->is_mapped) | ||
| 351 | continue; | ||
| 352 | if (map->vma->vm_start >= end) | 348 | if (map->vma->vm_start >= end) |
| 353 | continue; | 349 | continue; |
| 354 | if (map->vma->vm_end <= start) | 350 | if (map->vma->vm_end <= start) |
| @@ -663,8 +659,6 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) | |||
| 663 | if (err) | 659 | if (err) |
| 664 | goto out_put_map; | 660 | goto out_put_map; |
| 665 | 661 | ||
| 666 | map->is_mapped = 1; | ||
| 667 | |||
| 668 | if (!use_ptemod) { | 662 | if (!use_ptemod) { |
| 669 | for (i = 0; i < count; i++) { | 663 | for (i = 0; i < count; i++) { |
| 670 | err = vm_insert_page(vma, vma->vm_start + i*PAGE_SIZE, | 664 | err = vm_insert_page(vma, vma->vm_start + i*PAGE_SIZE, |
| @@ -681,6 +675,8 @@ unlock_out: | |||
| 681 | return err; | 675 | return err; |
| 682 | 676 | ||
| 683 | out_put_map: | 677 | out_put_map: |
| 678 | if (use_ptemod) | ||
| 679 | map->vma = NULL; | ||
| 684 | gntdev_put_map(map); | 680 | gntdev_put_map(map); |
| 685 | return err; | 681 | return err; |
| 686 | } | 682 | } |
