From 9cfeede46b1966b67c2e0a5ec65059cdb886e5dc Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 3 May 2003 22:13:40 -0700 Subject: [PATCH] make obsolete This file was _the_ header for block-device related stuff in earlier Linux versions, but nowdays there's just a few prototypes left that really belong into blkdev.h or genhd.h (and in one case elevator.h). This patch moves them over and removes everything but including blkdev.h from blk.h Note that blkdev.h gets all the headers that were included in blk.h inmplicitly too. Now we can start removing all references to it an maybe kill it off before 2.6. *sniff* --- include/linux/blkdev.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/linux/blkdev.h') diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3899acc8a4f1..32a8cddd2ca3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -348,6 +348,30 @@ static inline request_queue_t *bdev_get_queue(struct block_device *bdev) return bdev->bd_disk->queue; } +/* + * end_request() and friends. Must be called with the request queue spinlock + * acquired. All functions called within end_request() _must_be_ atomic. + * + * Several drivers define their own end_request and call + * end_that_request_first() and end_that_request_last() + * for parts of the original function. This prevents + * code duplication in drivers. + */ +extern int end_that_request_first(struct request *, int, int); +extern int end_that_request_chunk(struct request *, int, int); +extern void end_that_request_last(struct request *); +extern void end_request(struct request *req, int uptodate); + +static inline void blkdev_dequeue_request(struct request *req) +{ + BUG_ON(list_empty(&req->queuelist)); + + list_del_init(&req->queuelist); + + if (req->q) + elv_remove_request(req->q, req); +} + /* * get ready for proper ref counting */ -- cgit v1.2.3