diff options
author | Richard Yao <[email protected]> | 2014-07-06 20:34:51 -0400 |
---|---|---|
committer | Richard Yao <[email protected]> | 2015-09-04 15:37:24 -0400 |
commit | dd6f9fe61b522d878ab29a119e5fe9dab5b9f7d5 (patch) | |
tree | 2727e869a9ceae6308e9e5029b9a6ee4109a1f4b /include | |
parent | 65f340e72579cf43ec30d9b265b0d3e1f5955bd5 (diff) |
Remove blk_end_request() autotools check.
Signed-off-by: Richard Yao <[email protected]>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev_compat.h | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index 2dbf87ca6..a8a2700af 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -58,80 +58,6 @@ blk_requeue_request(request_queue_t *q, struct request *req) } #endif /* HAVE_BLK_REQUEUE_REQUEST */ -#ifndef HAVE_BLK_END_REQUEST -static inline bool -__blk_end_request(struct request *req, int error, unsigned int nr_bytes) -{ - LIST_HEAD(list); - - /* - * Request has already been dequeued but 2.6.18 version of - * end_request() unconditionally dequeues the request so we - * add it to a local list to prevent hitting the BUG_ON. - */ - list_add(&req->queuelist, &list); - - /* - * The old API required the driver to end each segment and not - * the entire request. In our case we always need to end the - * entire request partial requests are not supported. - */ - req->hard_cur_sectors = nr_bytes >> 9; - end_request(req, ((error == 0) ? 1 : error)); - - return (0); -} - -static inline bool -blk_end_request(struct request *req, int error, unsigned int nr_bytes) -{ - struct request_queue *q = req->q; - bool rc; - - spin_lock_irq(q->queue_lock); - rc = __blk_end_request(req, error, nr_bytes); - spin_unlock_irq(q->queue_lock); - - return (rc); -} -#else -#ifdef HAVE_BLK_END_REQUEST_GPL_ONLY -/* - * Define required to avoid conflicting 2.6.29 non-static prototype for a - * GPL-only version of the helper. As of 2.6.31 the helper is available - * to non-GPL modules and is not explicitly exported GPL-only. - */ -#define __blk_end_request __blk_end_request_x -#define blk_end_request blk_end_request_x - -static inline bool -__blk_end_request_x(struct request *req, int error, unsigned int nr_bytes) -{ - /* - * The old API required the driver to end each segment and not - * the entire request. In our case we always need to end the - * entire request partial requests are not supported. - */ - req->hard_cur_sectors = nr_bytes >> 9; - end_request(req, ((error == 0) ? 1 : error)); - - return (0); -} -static inline bool -blk_end_request_x(struct request *req, int error, unsigned int nr_bytes) -{ - struct request_queue *q = req->q; - bool rc; - - spin_lock_irq(q->queue_lock); - rc = __blk_end_request_x(req, error, nr_bytes); - spin_unlock_irq(q->queue_lock); - - return (rc); -} -#endif /* HAVE_BLK_END_REQUEST_GPL_ONLY */ -#endif /* HAVE_BLK_END_REQUEST */ - /* * 2.6.36 API change, * The blk_queue_flush() interface has replaced blk_queue_ordered() |