diff options
author | jhb <jhb@FreeBSD.org> | 2001-06-25 18:24:52 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-06-25 18:24:52 +0000 |
commit | 5a93a436f60afb2ec81f61929b9355f6c41bf57a (patch) | |
tree | 7f54777f1869f326bf78ddda4813cfc8aff367d5 /sys | |
parent | 8e79a4340566fe878bc25396efd0910a11c08fcd (diff) | |
download | FreeBSD-src-5a93a436f60afb2ec81f61929b9355f6c41bf57a.zip FreeBSD-src-5a93a436f60afb2ec81f61929b9355f6c41bf57a.tar.gz |
We don't need the vm lock to perform a few simple calculations on the
md device's softc.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 53079b6..a7de5c2 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -755,9 +755,9 @@ mdcreate_swap(struct md_ioctl *mdio, struct proc *p) * Note the truncation. */ - mtx_lock(&vm_mtx); sc->secsize = PAGE_SIZE; sc->nsect = mdio->md_size / (PAGE_SIZE / DEV_BSIZE); + mtx_lock(&vm_mtx); sc->object = vm_pager_allocate(OBJT_SWAP, NULL, sc->secsize * (vm_offset_t)sc->nsect, VM_PROT_DEFAULT, 0); if (mdio->md_options & MD_RESERVE) { if (swap_pager_reserve(sc->object, 0, sc->nsect) < 0) { |