summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ufs')
-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