static struct request *__dd_dispatch_request(struct deadline_data *dd)
{
struct request *rq, *next_rq;
- bool reads, writes;
int data_dir;
lockdep_assert_held(&dd->lock);
goto done;
}
- reads = !list_empty(&dd->fifo_list[READ]);
- writes = !list_empty(&dd->fifo_list[WRITE]);
-
/*
* batches are currently reads XOR writes
*/
* data direction (read / write)
*/
- if (reads) {
+ if (!list_empty(&dd->fifo_list[READ])) {
BUG_ON(RB_EMPTY_ROOT(&dd->sort_list[READ]));
if (deadline_fifo_request(dd, WRITE) &&
* there are either no reads or writes have been starved
*/
- if (writes) {
+ if (!list_empty(&dd->fifo_list[WRITE])) {
dispatch_writes:
BUG_ON(RB_EMPTY_ROOT(&dd->sort_list[WRITE]));