Commit e3408ae9 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] kill LOCAL_END_REQUEST

And uninline end_request - it's calling to many functions to be useful
inline.
parent ab941afd
......@@ -2187,6 +2187,15 @@ void end_that_request_last(struct request *req)
complete(waiting);
}
void end_request(struct request *req, int uptodate)
{
if (!end_that_request_first(req, uptodate, req->hard_cur_sectors)) {
add_disk_randomness(req->rq_disk);
blkdev_dequeue_request(req);
end_that_request_last(req);
}
}
int __init blk_dev_init(void)
{
int total_ram = nr_free_pages() << (PAGE_SHIFT - 10);
......@@ -2229,6 +2238,7 @@ int __init blk_dev_init(void)
EXPORT_SYMBOL(end_that_request_first);
EXPORT_SYMBOL(end_that_request_chunk);
EXPORT_SYMBOL(end_that_request_last);
EXPORT_SYMBOL(end_request);
EXPORT_SYMBOL(blk_init_queue);
EXPORT_SYMBOL(blk_cleanup_queue);
EXPORT_SYMBOL(blk_queue_make_request);
......
......@@ -19,7 +19,6 @@
#define MAJOR_NR MTD_BLOCK_MAJOR
#define DEVICE_NAME "mtdblock"
#define DEVICE_NR(device) (device)
#define LOCAL_END_REQUEST
#include <linux/blk.h>
#include <linux/devfs_fs_kernel.h>
......
......@@ -18,7 +18,6 @@
#include <linux/buffer_head.h>
#include <linux/genhd.h>
#define LOCAL_END_REQUEST
#define MAJOR_NR MTD_BLOCK_MAJOR
#define DEVICE_NAME "mtdblock"
#include <linux/blk.h>
......
......@@ -10,8 +10,6 @@
* $Revision: 1.94 $
*/
#define LOCAL_END_REQUEST /* Don't generate end_request in blk.h */
#include <linux/config.h>
#include <linux/kmod.h>
#include <linux/init.h>
......
......@@ -25,6 +25,7 @@ extern void rand_initialize_disk(struct gendisk *disk);
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);
struct request *elv_next_request(request_queue_t *q);
static inline void blkdev_dequeue_request(struct request *req)
......@@ -37,19 +38,4 @@ static inline void blkdev_dequeue_request(struct request *req)
elv_remove_request(req->q, req);
}
/*
* If we have our own end_request, we do not want to include this mess
*/
#ifndef LOCAL_END_REQUEST
static inline void end_request(struct request *req, int uptodate)
{
if (end_that_request_first(req, uptodate, req->hard_cur_sectors))
return;
add_disk_randomness(req->rq_disk);
blkdev_dequeue_request(req);
end_that_request_last(req);
}
#endif /* !LOCAL_END_REQUEST */
#endif /* _BLK_H */
......@@ -1245,7 +1245,6 @@ extern int noautodma;
* We need blk.h, but we replace its end_request by our own version.
*/
#define IDE_DRIVER /* Toggle some magic bits in blk.h */
#define LOCAL_END_REQUEST /* Don't generate end_request in blk.h */
#include <linux/blk.h>
extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment