diff options
author | alfred <alfred@FreeBSD.org> | 2001-05-23 10:30:25 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-05-23 10:30:25 +0000 |
commit | edd79c680a3d5f268abcca63e5770ff8bfc5a885 (patch) | |
tree | 9c1c13b7db9328466d7427484aa722a209c0e741 /sys | |
parent | 587340efa6952ac0891086616d3167544dcba882 (diff) | |
download | FreeBSD-src-edd79c680a3d5f268abcca63e5770ff8bfc5a885.zip FreeBSD-src-edd79c680a3d5f268abcca63e5770ff8bfc5a885.tar.gz |
ufs_bmaparray() may block on IO, drop vm mutex and aquire Giant when
calling it from the pager routine
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ufs/ufs_readwrite.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index 672d0a0..6f56aee 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -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; /* |