summaryrefslogtreecommitdiffstats
path: root/sys/vm/device_pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/device_pager.c')
-rw-r--r--sys/vm/device_pager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index f2131dd..411482a 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
@@ -217,8 +217,10 @@ dev_pager_getpages(object, m, count, reqpage)
memattr = object->memattr;
VM_OBJECT_UNLOCK(object);
csw = dev_refthread(dev, &ref);
- if (csw == NULL)
- panic("dev_pager_getpage: no cdevsw");
+ if (csw == NULL) {
+ VM_OBJECT_LOCK(object);
+ return (VM_PAGER_FAIL);
+ }
td = curthread;
fpop = td->td_fpop;
td->td_fpop = NULL;
OpenPOWER on IntegriCloud