diff options
author | weiping zhang <zhangweiping@didichuxing.com> | 2017-11-23 14:39:55 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-24 06:00:18 +0100 |
commit | 62d772fa9d86856d828cd24dd8fff5c83275c7e1 (patch) | |
tree | a9311e8d946ca2809d829e1a6c60252b8e9dd64f /block/blk-wbt.c | |
parent | blk-sysfs: remove NULL pointer checking in queue_wb_lat_store (diff) | |
download | linux-62d772fa9d86856d828cd24dd8fff5c83275c7e1.tar.xz linux-62d772fa9d86856d828cd24dd8fff5c83275c7e1.zip |
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) 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); } /* |