• Jens Axboe's avatar
    [PATCH] kill blk_queue_empty() · 68132d89
    Jens Axboe authored
    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.
    68132d89
xd.c 33.7 KB