summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-05-23 19:51:12 +0000
committerjhb <jhb@FreeBSD.org>2001-05-23 19:51:12 +0000
commit719e9bc0bffe8a7eb80e359f9c43a28b7c65fd14 (patch)
treedcad78a662141b631cefb49b639d2c7795111787 /sys/kern/vfs_default.c
parent2434332d91b4f39ff3786b3aab3122174307715e (diff)
downloadFreeBSD-src-719e9bc0bffe8a7eb80e359f9c43a28b7c65fd14.zip
FreeBSD-src-719e9bc0bffe8a7eb80e359f9c43a28b7c65fd14.tar.gz
Don't release the vm lock just to turn around and grab it again.
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index d17e934..dc5b9c9 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -537,7 +537,6 @@ retry:
goto retn;
mtx_lock(&vm_mtx);
object = vnode_pager_alloc(vp, vat.va_size, 0, 0);
- mtx_unlock(&vm_mtx);
} else if (devsw(vp->v_rdev) != NULL) {
/*
* This simply allocates the biggest object possible
@@ -546,7 +545,6 @@ retry:
*/
mtx_lock(&vm_mtx);
object = vnode_pager_alloc(vp, IDX_TO_OFF(INT_MAX), 0, 0);
- mtx_unlock(&vm_mtx);
} else {
goto retn;
}
@@ -554,7 +552,6 @@ retry:
* Dereference the reference we just created. This assumes
* that the object is associated with the vp.
*/
- mtx_lock(&vm_mtx);
object->ref_count--;
mtx_unlock(&vm_mtx);
vp->v_usecount--;
OpenPOWER on IntegriCloud