Skip to content

Commit

Permalink
blk-throttle: remove spurious throtl_enqueue_tg() call from throtl_se…
Browse files Browse the repository at this point in the history
…lect_dispatch()

throtl_select_dispatch() calls throtl_enqueue_tg() right after
tg_update_disptime(), which always calls the function anyway.  The
call is, while harmless, unnecessary.  Remove it.

This patch doesn't introduce any behavior difference.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
  • Loading branch information
htejun committed May 14, 2013
1 parent 2a4fd07 commit 2db6314
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,8 @@ static int throtl_select_dispatch(struct throtl_data *td, struct bio_list *bl)

nr_disp += throtl_dispatch_tg(td, tg, bl);

if (tg->nr_queued[0] || tg->nr_queued[1]) {
if (tg->nr_queued[0] || tg->nr_queued[1])
tg_update_disptime(td, tg);
throtl_enqueue_tg(td, tg);
}

if (nr_disp >= throtl_quantum)
break;
Expand Down

0 comments on commit 2db6314

Please sign in to comment.