ia64/xen-unstable

changeset 4863:cabc09d5f3b8

bitkeeper revision 1.1389.19.2 (428321b5bcT5YAmWdW7tRiZwz5gF8A)

Fix read-only mappings in blkback driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 12 09:28:21 2005 +0000 (2005-05-12)
parents 013d5aa0f1e8
children ab9da433c598
files linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Thu May 12 09:27:46 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c	Thu May 12 09:28:21 2005 +0000
     1.3 @@ -486,12 +486,11 @@ static void dispatch_rw_block_io(blkif_t
     1.4          preq.nr_sects += seg[i].nsec;
     1.5  
     1.6          aop[i].u.map_grant_ref.host_virt_addr = MMAP_VADDR(pending_idx, i);
     1.7 -
     1.8          aop[i].u.map_grant_ref.dom = blkif->domid;
     1.9          aop[i].u.map_grant_ref.ref = blkif_gref_from_fas(fas);
    1.10 -        aop[i].u.map_grant_ref.flags = ( GNTMAP_host_map   |
    1.11 -                                       ( ( operation == READ ) ?
    1.12 -                                             0 : GNTMAP_readonly ) );
    1.13 +        aop[i].u.map_grant_ref.flags = GNTMAP_host_map;
    1.14 +        if ( operation == READ )
    1.15 +            aop[i].u.map_grant_ref.flags |= GNTMAP_readonly;
    1.16      }
    1.17  
    1.18      if ( unlikely(HYPERVISOR_grant_table_op(