diff options
author | weiping zhang <zhangweiping@didichuxing.com> | 2017-11-23 08:39:55 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-24 00:00:18 -0500 |
commit | 62d772fa9d86856d828cd24dd8fff5c83275c7e1 (patch) | |
tree | a9311e8d946ca2809d829e1a6c60252b8e9dd64f /block/blk-wbt.c | |
parent | f680474345f1fd6329d1806d6358066fd3b07f02 (diff) |
blk-wbt: move wbt_clear_stat to common place in wbt_done
wbt_done call wbt_clear_stat no matter current stat was tracked
or not, move it to common place.
Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-wbt.c')
-rw-r--r-- | block/blk-wbt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-wbt.c b/block/blk-wbt.c index ec903532a5d1..19faecc5f8f6 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c | |||
@@ -178,12 +178,11 @@ void wbt_done(struct rq_wb *rwb, struct blk_issue_stat *stat) | |||
178 | 178 | ||
179 | if (wbt_is_read(stat)) | 179 | if (wbt_is_read(stat)) |
180 | wb_timestamp(rwb, &rwb->last_comp); | 180 | wb_timestamp(rwb, &rwb->last_comp); |
181 | wbt_clear_state(stat); | ||
182 | } else { | 181 | } else { |
183 | WARN_ON_ONCE(stat == rwb->sync_cookie); | 182 | WARN_ON_ONCE(stat == rwb->sync_cookie); |
184 | __wbt_done(rwb, wbt_stat_to_mask(stat)); | 183 | __wbt_done(rwb, wbt_stat_to_mask(stat)); |
185 | wbt_clear_state(stat); | ||
186 | } | 184 | } |
185 | wbt_clear_state(stat); | ||
187 | } | 186 | } |
188 | 187 | ||
189 | /* | 188 | /* |