summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-01-28 16:04:44 +0000
committerjeff <jeff@FreeBSD.org>2005-01-28 16:04:44 +0000
commit83cae1af10dbd0a4b0bbee7988ff841948656c91 (patch)
tree05d91b26be0e3385782698a42ad06a9bb25a5a63
parent1b21636022cb61815279ff37e41229257d83e55b (diff)
downloadFreeBSD-src-83cae1af10dbd0a4b0bbee7988ff841948656c91.zip
FreeBSD-src-83cae1af10dbd0a4b0bbee7988ff841948656c91.tar.gz
- If mpsafevfs is off, acquire giant around all calls to bufdone().
Sponsored by: Isilon Systems, Inc.
-rw-r--r--sys/geom/geom_vfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c
index 2e8ae34..405521b 100644
--- a/sys/geom/geom_vfs.c
+++ b/sys/geom/geom_vfs.c
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/vnode.h>
+#include <sys/mount.h> /* XXX Temporary for VFS_LOCK_GIANT */
#include <geom/geom.h>
#include <geom/geom_vfs.h>
@@ -65,6 +66,7 @@ static void
g_vfs_done(struct bio *bip)
{
struct buf *bp;
+ int vfslocked;
if (bip->bio_error) {
printf("g_vfs_done():");
@@ -78,7 +80,9 @@ g_vfs_done(struct bio *bip)
bp->b_ioflags |= BIO_ERROR;
bp->b_resid = bp->b_bcount - bip->bio_completed;
g_destroy_bio(bip);
+ vfslocked = VFS_LOCK_GIANT(((struct mount *)NULL));
bufdone(bp);
+ VFS_UNLOCK_GIANT(vfslocked);
}
void
OpenPOWER on IntegriCloud