direct-io.hg

changeset 5899:7a30b587387f

Fix gnttab bug in blkfront.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jul 28 09:10:05 2005 +0000 (2005-07-28)
parents fb5de385a9ee
children 1db202550e82
files linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Wed Jul 27 23:15:15 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Thu Jul 28 09:10:05 2005 +0000
     1.3 @@ -1428,8 +1428,9 @@ int __init xlblk_init(void)
     1.4      int i;
     1.5  
     1.6  #ifdef CONFIG_XEN_BLKDEV_GRANT
     1.7 -    if ( 0 > gnttab_alloc_grant_references( MAXIMUM_OUTSTANDING_BLOCK_REQS,
     1.8 -                                            &gref_head, &gref_terminal ))
     1.9 +    /* A grant for every ring slot, plus one for the ring itself. */
    1.10 +    if ( 0 > gnttab_alloc_grant_references(MAXIMUM_OUTSTANDING_BLOCK_REQS + 1,
    1.11 +                                           &gref_head, &gref_terminal) )
    1.12          return 1;
    1.13      printk(KERN_ALERT "Blkif frontend is using grant tables.\n");
    1.14  #endif