diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2007-03-29 13:26:13 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2007-03-29 13:26:13 +0000 |
commit | 78bc9b6aa1399a04a7fe5c42c19f6667df93b3fa (patch) | |
tree | f01ec24087351d1feebb9340c24a38b4611b1dd7 /sys | |
parent | ac125ddc4f3588ec7591fd3f809bcdbb33c75aec (diff) | |
download | FreeBSD-src-78bc9b6aa1399a04a7fe5c42c19f6667df93b3fa.zip FreeBSD-src-78bc9b6aa1399a04a7fe5c42c19f6667df93b3fa.tar.gz |
vm_map_delete should be used only internally, by the VM subsystem. Replace
it with vm_map_remove, which not only embeds additional check, but also
takes care of locking.
Reviewed by: alc
Approved by: alc, cognet (mentor)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 006dcb9..b642040 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -633,12 +633,8 @@ bfreekva(struct buf *bp) if (bp->b_kvasize) { atomic_add_int(&buffreekvacnt, 1); atomic_subtract_int(&bufspace, bp->b_kvasize); - vm_map_lock(buffer_map); - vm_map_delete(buffer_map, - (vm_offset_t) bp->b_kvabase, - (vm_offset_t) bp->b_kvabase + bp->b_kvasize - ); - vm_map_unlock(buffer_map); + vm_map_remove(buffer_map, (vm_offset_t) bp->b_kvabase, + (vm_offset_t) bp->b_kvabase + bp->b_kvasize); bp->b_kvasize = 0; bufspacewakeup(); } |