artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbf9320
)
Use mutex_trylock() rather than mixing Linux APIs with OpenBSD ones.
author
mpi
<mpi@openbsd.org>
Tue, 28 Nov 2017 13:38:11 +0000
(13:38 +0000)
committer
mpi
<mpi@openbsd.org>
Tue, 28 Nov 2017 13:38:11 +0000
(13:38 +0000)
ok kettenis@
sys/dev/pci/drm/i915/i915_gem.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/i915/i915_gem.c
b/sys/dev/pci/drm/i915/i915_gem.c
index
676a2e6
..
306db1b
100644
(file)
--- a/
sys/dev/pci/drm/i915/i915_gem.c
+++ b/
sys/dev/pci/drm/i915/i915_gem.c
@@
-2216,7
+2216,7
@@
i915_gem_fault(struct drm_gem_object *gem_obj, struct uvm_faultinfo *ufi,
offset -= drm_vma_node_offset_addr(&obj->base.vma_node);
- if (
rw_enter(&dev->struct_mutex, RW_NOSLEEP | RW_WRITE) != 0
) {
+ if (
!mutex_trylock(&dev->struct_mutex)
) {
uvmfault_unlockall(ufi, NULL, &obj->base.uobj, NULL);
mutex_lock(&dev->struct_mutex);
locked = uvmfault_relock(ufi);