aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_bio.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 76ada0709bc9..e15d8a11c631 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -5154,12 +5154,16 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int count,
br_flags = (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS)
!= 0) ? GB_UNMAPPED : 0;
again:
- for (i = 0; i < count; i++)
- vm_page_busy_downgrade(ma[i]);
+ for (i = 0; i < count; i++) {
+ if (ma[i] != bogus_page)
+ vm_page_busy_downgrade(ma[i]);
+ }
lbnp = -1;
for (i = 0; i < count; i++) {
m = ma[i];
+ if (m == bogus_page)
+ continue;
/*
* Pages are shared busy and the object lock is not
@@ -5228,6 +5232,8 @@ end_pages:
redo = false;
for (i = 0; i < count; i++) {
+ if (ma[i] == bogus_page)
+ continue;
if (vm_page_busy_tryupgrade(ma[i]) == 0) {
vm_page_sunbusy(ma[i]);
ma[i] = vm_page_grab_unlocked(object, ma[i]->pindex,