From 68132d898b0a59334b55e95f646173f6efc3e75b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 6 Apr 2003 18:29:36 -0700 Subject: [PATCH] kill blk_queue_empty() This finally kills of blk_queue_empty(). This is similar to the patch I recently sent to fix the SCSI logic as well. A lot of drivers are doing this in our core, mainly because that is the way they always did it: start_queue: if (blk_queue_empty(q)) return; rq = elv_next_request(q); if (!rq) return; Patch simply removes the blk_queue_empty() check, and adds a check for !rq return from elv_next_request() if the driver didn't already do that. Additionally, the AS io scheduler can return NULL from elv_next_request() if it thinks this is best. This way we are also prepared for that to work well. Patch was done by Nick Piggin. --- include/linux/blkdev.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/blkdev.h') diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b5a2f676c4f8..ee3f66a5e60c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -260,7 +260,6 @@ struct request_queue #define blk_queue_plugged(q) !list_empty(&(q)->plug_list) #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) -#define blk_queue_empty(q) elv_queue_empty(q) #define blk_fs_request(rq) ((rq)->flags & REQ_CMD) #define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC) #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) -- cgit v1.2.3