diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-16 20:21:34 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-16 20:21:34 +0000 |
commit | a6796c239bc5a202718ad8f3be6b04c2a899490d (patch) | |
tree | 829db5a65424eaa864d3759f278a3b6c7b1c9e65 | |
parent | 19827936403d1d3ba9b2b22d1894c3b120e053f9 (diff) | |
download | xen-a6796c239bc5a202718ad8f3be6b04c2a899490d.tar.gz xen-a6796c239bc5a202718ad8f3be6b04c2a899490d.tar.bz2 xen-a6796c239bc5a202718ad8f3be6b04c2a899490d.zip |
bitkeeper revision 1.1159.258.132 (428900ceGeeOt2WYcJ01WZMZCdJCHA)
Fix multi-page I/O accesses in the blkback driver in cases where we
receive partial-completion callbacks.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c index 375377b138..dc15b20180 100644 --- a/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c +++ b/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c @@ -252,8 +252,9 @@ static void end_block_io_op(struct buffer_head *bh, int uptodate) #else static int end_block_io_op(struct bio *bio, unsigned int done, int error) { - if ( done || error ) - __end_block_io_op(bio->bi_private, (done && !error)); + if ( bio->bi_size != 0 ) + return 1; + __end_block_io_op(bio->bi_private, !error); bio_put(bio); return error; } |