summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-30 11:26:58 +0000
committerjeff <jeff@FreeBSD.org>2005-04-30 11:26:58 +0000
commitf9172cb2757b7ce1f156b21a8c7681695c48b9fd (patch)
tree15c30077017fd792e7d65d4a230ed3c565fa011e /sys/kern/vfs_cluster.c
parent5adae6c6229fe6dabcf2fe80345c194970ae8333 (diff)
downloadFreeBSD-src-f9172cb2757b7ce1f156b21a8c7681695c48b9fd.zip
FreeBSD-src-f9172cb2757b7ce1f156b21a8c7681695c48b9fd.tar.gz
- Call VM_LOCK_GIANT in cluster_callback() to protect some pmap calls. VFS
will not be acquiring Giant before calling this function anymore. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index c3c6e5a..a6165cf 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -524,7 +524,9 @@ cluster_callback(bp)
if (bp->b_ioflags & BIO_ERROR)
error = bp->b_error;
+ VM_LOCK_GIANT();
pmap_qremove(trunc_page((vm_offset_t) bp->b_data), bp->b_npages);
+ VM_UNLOCK_GIANT();
/*
* Move memory from the large cluster buffer into the component
* buffers and mark IO as done on these.
OpenPOWER on IntegriCloud