aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6.11-xen-sparse
diff options
context:
space:
mode:
authorakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>2005-06-09 09:41:04 +0000
committerakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>2005-06-09 09:41:04 +0000
commit7556663ceb36533b6dd84135c310854915ae3470 (patch)
tree6dd3bf8a23bf35b7d288546cd5ca9532f339fb72 /linux-2.6.11-xen-sparse
parent7995fce76335d573f562bc8a55648db4122c6d25 (diff)
downloadxen-7556663ceb36533b6dd84135c310854915ae3470.tar.gz
xen-7556663ceb36533b6dd84135c310854915ae3470.tar.bz2
xen-7556663ceb36533b6dd84135c310854915ae3470.zip
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
Diffstat (limited to 'linux-2.6.11-xen-sparse')
-rw-r--r--linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c11
1 files changed, 9 insertions, 2 deletions
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;
}