summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-05-23 10:30:25 +0000
committeralfred <alfred@FreeBSD.org>2001-05-23 10:30:25 +0000
commitedd79c680a3d5f268abcca63e5770ff8bfc5a885 (patch)
tree9c1c13b7db9328466d7427484aa722a209c0e741
parent587340efa6952ac0891086616d3167544dcba882 (diff)
downloadFreeBSD-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
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c10
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;
/*
OpenPOWER on IntegriCloud