ufs_bmaparray() may block on IO, drop vm mutex and aquire Giant when
calling it from the pager routine
This commit is contained in:
parent
587340efa6
commit
edd79c680a
@ -646,9 +646,16 @@ ffs_getpages(ap)
|
||||
reqlblkno = foff / bsize;
|
||||
poff = (foff % bsize) / PAGE_SIZE;
|
||||
|
||||
mtx_unlock(&vm_mtx);
|
||||
mtx_lock(&Giant);
|
||||
|
||||
dp = VTOI(vp)->i_devvp;
|
||||
if (ufs_bmaparray(vp, reqlblkno, &reqblkno, &bforwards, &bbackwards)
|
||||
|| (reqblkno == -1)) {
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
mtx_lock(&vm_mtx);
|
||||
|
||||
for(i = 0; i < pcount; i++) {
|
||||
if (i != ap->a_reqpage)
|
||||
vm_page_free(ap->a_m[i]);
|
||||
@ -664,6 +671,9 @@ ffs_getpages(ap)
|
||||
}
|
||||
}
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
mtx_lock(&vm_mtx);
|
||||
|
||||
physoffset = (off_t)reqblkno * DEV_BSIZE + poff * PAGE_SIZE;
|
||||
pagesperblock = bsize / PAGE_SIZE;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user