| @@ -659,26 +659,28 @@ void drm_gem_object_handle_free(struct d | | | @@ -659,26 +659,28 @@ void drm_gem_object_handle_free(struct d |
659 | /* | | 659 | /* |
660 | * The object name held a reference to this object, drop | | 660 | * The object name held a reference to this object, drop |
661 | * that now. | | 661 | * that now. |
662 | * | | 662 | * |
663 | * This cannot be the last reference, since the handle holds one too. | | 663 | * This cannot be the last reference, since the handle holds one too. |
664 | */ | | 664 | */ |
665 | kref_put(&obj->refcount, drm_gem_object_ref_bug); | | 665 | kref_put(&obj->refcount, drm_gem_object_ref_bug); |
666 | } else | | 666 | } else |
667 | spin_unlock(&dev->object_name_lock); | | 667 | spin_unlock(&dev->object_name_lock); |
668 | | | 668 | |
669 | } | | 669 | } |
670 | EXPORT_SYMBOL(drm_gem_object_handle_free); | | 670 | EXPORT_SYMBOL(drm_gem_object_handle_free); |
671 | | | 671 | |
| | | 672 | #ifndef __NetBSD__ |
| | | 673 | |
672 | void drm_gem_vm_open(struct vm_area_struct *vma) | | 674 | void drm_gem_vm_open(struct vm_area_struct *vma) |
673 | { | | 675 | { |
674 | struct drm_gem_object *obj = vma->vm_private_data; | | 676 | struct drm_gem_object *obj = vma->vm_private_data; |
675 | | | 677 | |
676 | drm_gem_object_reference(obj); | | 678 | drm_gem_object_reference(obj); |
677 | | | 679 | |
678 | mutex_lock(&obj->dev->struct_mutex); | | 680 | mutex_lock(&obj->dev->struct_mutex); |
679 | drm_vm_open_locked(obj->dev, vma); | | 681 | drm_vm_open_locked(obj->dev, vma); |
680 | mutex_unlock(&obj->dev->struct_mutex); | | 682 | mutex_unlock(&obj->dev->struct_mutex); |
681 | } | | 683 | } |
682 | EXPORT_SYMBOL(drm_gem_vm_open); | | 684 | EXPORT_SYMBOL(drm_gem_vm_open); |
683 | | | 685 | |
684 | void drm_gem_vm_close(struct vm_area_struct *vma) | | 686 | void drm_gem_vm_close(struct vm_area_struct *vma) |
| @@ -758,13 +760,15 @@ int drm_gem_mmap(struct file *filp, stru | | | @@ -758,13 +760,15 @@ int drm_gem_mmap(struct file *filp, stru |
758 | * (which should happen whether the vma was created by this call, or | | 760 | * (which should happen whether the vma was created by this call, or |
759 | * by a vm_open due to mremap or partial unmap or whatever). | | 761 | * by a vm_open due to mremap or partial unmap or whatever). |
760 | */ | | 762 | */ |
761 | drm_gem_object_reference(obj); | | 763 | drm_gem_object_reference(obj); |
762 | | | 764 | |
763 | drm_vm_open_locked(dev, vma); | | 765 | drm_vm_open_locked(dev, vma); |
764 | | | 766 | |
765 | out_unlock: | | 767 | out_unlock: |
766 | mutex_unlock(&dev->struct_mutex); | | 768 | mutex_unlock(&dev->struct_mutex); |
767 | | | 769 | |
768 | return ret; | | 770 | return ret; |
769 | } | | 771 | } |
770 | EXPORT_SYMBOL(drm_gem_mmap); | | 772 | EXPORT_SYMBOL(drm_gem_mmap); |
| | | 773 | |
| | | 774 | #endif /* defined(__NetBSD__) */ |