Skip to content

Commit

Permalink
blk-wbt: move wbt_clear_stat to common place in wbt_done
Browse files Browse the repository at this point in the history
wbt_done call wbt_clear_stat no matter current stat was tracked
or not, move it to common place.

Signed-off-by: weiping zhang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
weiping zhang authored and axboe committed Nov 24, 2017
1 parent f680474 commit 62d772f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/blk-wbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,11 @@ void wbt_done(struct rq_wb *rwb, struct blk_issue_stat *stat)

if (wbt_is_read(stat))
wb_timestamp(rwb, &rwb->last_comp);
wbt_clear_state(stat);
} else {
WARN_ON_ONCE(stat == rwb->sync_cookie);
__wbt_done(rwb, wbt_stat_to_mask(stat));
wbt_clear_state(stat);
}
wbt_clear_state(stat);
}

/*
Expand Down

0 comments on commit 62d772f

Please sign in to comment.