diff options
Diffstat (limited to 'block/blk-wbt.c')
| -rw-r--r-- | block/blk-wbt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/blk-wbt.c b/block/blk-wbt.c index b252da0e4c11..ae8de9780085 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 | /* |
| @@ -482,7 +481,7 @@ static inline unsigned int get_limit(struct rq_wb *rwb, unsigned long rw) | |||
| 482 | 481 | ||
| 483 | /* | 482 | /* |
| 484 | * At this point we know it's a buffered write. If this is | 483 | * At this point we know it's a buffered write. If this is |
| 485 | * kswapd trying to free memory, or REQ_SYNC is set, set, then | 484 | * kswapd trying to free memory, or REQ_SYNC is set, then |
| 486 | * it's WB_SYNC_ALL writeback, and we'll use the max limit for | 485 | * it's WB_SYNC_ALL writeback, and we'll use the max limit for |
| 487 | * that. If the write is marked as a background write, then use | 486 | * that. If the write is marked as a background write, then use |
| 488 | * the idle limit, or go to normal if we haven't had competing | 487 | * the idle limit, or go to normal if we haven't had competing |
| @@ -723,8 +722,6 @@ int wbt_init(struct request_queue *q) | |||
| 723 | init_waitqueue_head(&rwb->rq_wait[i].wait); | 722 | init_waitqueue_head(&rwb->rq_wait[i].wait); |
| 724 | } | 723 | } |
| 725 | 724 | ||
| 726 | rwb->wc = 1; | ||
| 727 | rwb->queue_depth = RWB_DEF_DEPTH; | ||
| 728 | rwb->last_comp = rwb->last_issue = jiffies; | 725 | rwb->last_comp = rwb->last_issue = jiffies; |
| 729 | rwb->queue = q; | 726 | rwb->queue = q; |
| 730 | rwb->win_nsec = RWB_WINDOW_NSEC; | 727 | rwb->win_nsec = RWB_WINDOW_NSEC; |
