Skip to content

Commit 726e99a

Browse files
Shaohua LiJens Axboe
Shaohua Li
authored and
Jens Axboe
committed
cfq-iosched: make code consistent
ioc->ioc_data is rcu protectd, so uses correct API to access it. This doesn't change any behavior, but just make code consistent. Signed-off-by: Shaohua Li <[email protected]> Cc: [email protected] # after ab4bd22 Signed-off-by: Jens Axboe <[email protected]>
1 parent 3181faa commit 726e99a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

block/cfq-iosched.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -3087,7 +3087,8 @@ cfq_drop_dead_cic(struct cfq_data *cfqd, struct io_context *ioc,
30873087

30883088
spin_lock_irqsave(&ioc->lock, flags);
30893089

3090-
BUG_ON(ioc->ioc_data == cic);
3090+
BUG_ON(rcu_dereference_check(ioc->ioc_data,
3091+
lockdep_is_held(&ioc->lock)) == cic);
30913092

30923093
radix_tree_delete(&ioc->radix_root, cfqd->cic_index);
30933094
hlist_del_rcu(&cic->cic_list);

0 commit comments

Comments
 (0)