diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 23:58:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 23:58:06 -0800 |
| commit | e1e2cfc3fb42dbe54dd94fe97ba17a62cd7a265b (patch) | |
| tree | 2cd3cb5d9f2c43fb7939bd95bdef808d113bc042 /include/linux/nbd.h | |
| parent | 3735375e3fd2f2286c1dc2f0131f39d438ae9a5c (diff) | |
v2.5.0.1 -> v2.5.0.2
- Greg KH: USB update
- Richard Gooch: refcounting for devfs
- Jens Axboe: start of new block IO layer
Diffstat (limited to 'include/linux/nbd.h')
| -rw-r--r-- | include/linux/nbd.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index b34d4d18d8f9..0dbf87851169 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -37,24 +37,25 @@ extern int requests_out; static void nbd_end_request(struct request *req) { - struct buffer_head *bh; + struct bio *bio; unsigned nsect; unsigned long flags; int uptodate = (req->errors == 0) ? 1 : 0; + request_queue_t *q = req->q; #ifdef PARANOIA requests_out++; #endif - spin_lock_irqsave(&io_request_lock, flags); - while((bh = req->bh) != NULL) { - nsect = bh->b_size >> 9; + spin_lock_irqsave(&q->queue_lock, flags); + while((bio = req->bio) != NULL) { + nsect = bio_sectors(bio); blk_finished_io(nsect); - req->bh = bh->b_reqnext; - bh->b_reqnext = NULL; - bh->b_end_io(bh, uptodate); + req->bio = bio->bi_next; + bio->bi_next = NULL; + bio_endio(bio, uptodate, nsect); } blkdev_release_request(req); - spin_unlock_irqrestore(&io_request_lock, flags); + spin_unlock_irqrestore(&q->queue_lock, flags); } #define MAX_NBD 128 |
