From 7556663ceb36533b6dd84135c310854915ae3470 Mon Sep 17 00:00:00 2001 From: "akw27@arcadians.cl.cam.ac.uk" Date: Thu, 9 Jun 2005 09:41:04 +0000 Subject: bitkeeper revision 1.1695 (42a80eb0iCQq47kS2MSpOLTFyng5Cg) Parallax fixes/updates: - all data access now through the async lookup code. - added synchronous wrappers for tools to use. - added end-to-end crc32 on all image blocks - various other fixes/cleanups/test stubs. Signed-off-by: andrew.warfield@cl.cam.ac.uk --- linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'linux-2.6.11-xen-sparse') diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c index 78a487662e..c01818b3d2 100644 --- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c +++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c @@ -34,7 +34,7 @@ unsigned long blktap_ring_ok; /* make this ring->state */ static wait_queue_head_t blktap_wait; /* Where things are inside the device mapping. */ -struct vm_area_struct *blktap_vma; +struct vm_area_struct *blktap_vma = NULL; unsigned long mmap_vstart; unsigned long rings_vstart; @@ -139,7 +139,14 @@ static int blktap_release(struct inode *inode, struct file *filp) ClearPageReserved(virt_to_page(blktap_ube_ring.sring)); free_page((unsigned long) blktap_ube_ring.sring); - + + /* Clear any active mappings. */ + if (blktap_vma != NULL) { + zap_page_range(blktap_vma, blktap_vma->vm_start, + blktap_vma->vm_end - blktap_vma->vm_start, NULL); + blktap_vma = NULL; + } + return 0; } -- cgit v1.2.3