Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eca5350 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe
Browse files

block: Avoid that sparse complains about context imbalance in __wbt_wait()



This patch does not change any functionality.

Fixes: e34cbd30 ("blk-wbt: add general throttling mechanism")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent f2e0a0b2
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -544,6 +544,8 @@ static inline bool may_queue(struct rq_wb *rwb, struct rq_wait *rqw,
 * the timer to kick off queuing again.
 * the timer to kick off queuing again.
 */
 */
static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
	__releases(lock)
	__acquires(lock)
{
{
	struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd());
	struct rq_wait *rqw = get_rq_wait(rwb, current_is_kswapd());
	DEFINE_WAIT(wait);
	DEFINE_WAIT(wait);
@@ -558,13 +560,12 @@ static void __wbt_wait(struct rq_wb *rwb, unsigned long rw, spinlock_t *lock)
		if (may_queue(rwb, rqw, &wait, rw))
		if (may_queue(rwb, rqw, &wait, rw))
			break;
			break;


		if (lock)
		if (lock) {
			spin_unlock_irq(lock);
			spin_unlock_irq(lock);

			io_schedule();
			io_schedule();

		if (lock)
			spin_lock_irq(lock);
			spin_lock_irq(lock);
		} else
			io_schedule();
	} while (1);
	} while (1);


	finish_wait(&rqw->wait, &wait);
	finish_wait(&rqw->wait, &wait);