diff options
Diffstat (limited to 'sys/uvm/uvm_vnode.c')
-rw-r--r-- | sys/uvm/uvm_vnode.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 8213f2699a4..a8aaa23cb45 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.134 2024/10/23 07:18:44 mpi Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.135 2024/11/27 10:41:38 mpi Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */ /* @@ -970,7 +970,6 @@ uvn_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps, for (lcv = 0, current_offset = offset ; lcv < *npagesp ; lcv++, current_offset += PAGE_SIZE) { - /* do we care about this page? if not, skip it */ if (pps[lcv] == PGO_DONTCARE) continue; @@ -978,12 +977,14 @@ uvn_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps, /* lookup page */ ptmp = uvm_pagelookup(uobj, current_offset); - /* to be useful must get a non-busy, non-released pg */ - if (ptmp == NULL || - (ptmp->pg_flags & PG_BUSY) != 0) { - if (lcv == centeridx || (flags & PGO_ALLPAGES) - != 0) - done = FALSE; /* need to do a wait or I/O! */ + /* + * to be useful must get a non-busy page + */ + if (ptmp == NULL || (ptmp->pg_flags & PG_BUSY) != 0) { + if (lcv == centeridx || + (flags & PGO_ALLPAGES) != 0) + /* need to do a wait or I/O! */ + done = FALSE; continue; } @@ -1014,12 +1015,8 @@ uvn_get(struct uvm_object *uobj, voff_t offset, struct vm_page **pps, * step 1c: now we've either done everything needed or we to * unlock and do some waiting or I/O. */ - *npagesp = gotpages; /* let caller know */ - if (done) - return VM_PAGER_OK; /* bingo! */ - else - return VM_PAGER_UNLOCK; + return done ? VM_PAGER_OK : VM_PAGER_UNLOCK; } /* |