diff options
-rw-r--r-- | sys/vm/device_pager.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 740abd6..e9b9e73 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -126,7 +126,6 @@ dev_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t fo csw = dev_refthread(dev); if (csw == NULL) return (NULL); - mtx_lock(&Giant); /* * Check that the specified range of the device allows the desired @@ -137,7 +136,6 @@ dev_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t fo npages = OFF_TO_IDX(size); for (off = foff; npages--; off += PAGE_SIZE) if ((*csw->d_mmap)(dev, off, &paddr, (int)prot) != 0) { - mtx_unlock(&Giant); dev_relthread(dev); return (NULL); } @@ -171,7 +169,6 @@ dev_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t fo } sx_xunlock(&dev_pager_sx); - mtx_unlock(&Giant); dev_relthread(dev); return (object); } @@ -216,12 +213,10 @@ dev_pager_getpages(object, m, count, reqpage) csw = dev_refthread(dev); if (csw == NULL) panic("dev_pager_getpage: no cdevsw"); - mtx_lock(&Giant); prot = PROT_READ; /* XXX should pass in? */ ret = (*csw->d_mmap)(dev, (vm_offset_t)offset << PAGE_SHIFT, &paddr, prot); KASSERT(ret == 0, ("dev_pager_getpage: map function returns error")); - mtx_unlock(&Giant); dev_relthread(dev); if ((m[reqpage]->flags & PG_FICTITIOUS) != 0) { |