@@ -726,12 +726,18 @@ static inline void queue_lockdep_assert_held(struct request_queue *q)
static inline void queue_flag_set_unlocked(unsigned int flag,
struct request_queue *q)
{
+ if (test_bit(QUEUE_FLAG_INIT_DONE, &q->queue_flags) &&
+ kref_read(&q->kobj.kref))
+ lockdep_assert_held(q->queue_lock);
__set_bit(flag, &q->queue_flags);
}
static inline void queue_flag_clear_unlocked(unsigned int flag,
struct request_queue *q)
{
+ if (test_bit(QUEUE_FLAG_INIT_DONE, &q->queue_flags) &&
+ kref_read(&q->kobj.kref))
+ lockdep_assert_held(q->queue_lock);
__clear_bit(flag, &q->queue_flags);
}