diff options
author | Bart Van Assche <Bart.VanAssche@sandisk.com> | 2017-01-02 11:48:47 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-02 11:48:47 -0500 |
commit | 9eca53508a157c6b6fdb6e06796902cf8a920d29 (patch) | |
tree | ae395ad008f1a44e6134d46f12407cad47c19112 /block/blk-wbt.c | |
parent | f2e0a0b292682dd94274d6793d76656b41526147 (diff) |
block: Avoid that sparse complains about context imbalance in __wbt_wait()
This patch does not change any functionality.
Fixes: e34cbd307477 ("blk-wbt: add general throttling mechanism")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-wbt.c')
-rw-r--r-- | block/blk-wbt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-wbt.c b/block/blk-wbt.c index fd28c2806406..f0a9c07b4c7a 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c | |||
@@ -544,6 +544,8 @@ static inline bool may_queue(struct rq_wb *rwb, struct rq_wait *rqw, | |||
544 | * the timer to kick off queuing again. | 544 | * the timer to kick off queuing again. |
545 | */ | 545 | */ |
546 | static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock) | 546 | static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock) |
547 | __releases(lock) | ||
548 | __acquires(lock) | ||
547 | { | 549 | { |
548 | struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd()); | 550 | struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd()); |
549 | DEFINE_WAIT(wait); | 551 | DEFINE_WAIT(wait); |
@@ -558,13 +560,12 @@ static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock) | |||
558 | if (may_queue(rwb, rqw, &wait, rw)) | 560 | if (may_queue(rwb, rqw, &wait, rw)) |
559 | break; | 561 | break; |
560 | 562 | ||
561 | if (lock) | 563 | if (lock) { |
562 | spin_unlock_irq(lock); | 564 | spin_unlock_irq(lock); |
563 | 565 | io_schedule(); | |
564 | io_schedule(); | ||
565 | |||
566 | if (lock) | ||
567 | spin_lock_irq(lock); | 566 | spin_lock_irq(lock); |
567 | } else | ||
568 | io_schedule(); | ||
568 | } while (1); | 569 | } while (1); |
569 | 570 | ||
570 | finish_wait(&rqw->wait, &wait); | 571 | finish_wait(&rqw->wait, &wait); |