Skip to content

Commit

Permalink
cfq-iosched: make code consistent
Browse files Browse the repository at this point in the history
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 <shaohua.li@intel.com>
Cc: stable@kernel.org # after ab4bd22
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Shaohua Li authored and Jens Axboe committed Jun 27, 2011
1 parent 3181faa commit 726e99a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3087,7 +3087,8 @@ cfq_drop_dead_cic(struct cfq_data *cfqd, struct io_context *ioc,

spin_lock_irqsave(&ioc->lock, flags);

BUG_ON(ioc->ioc_data == cic);
BUG_ON(rcu_dereference_check(ioc->ioc_data,
lockdep_is_held(&ioc->lock)) == cic);

radix_tree_delete(&ioc->radix_root, cfqd->cic_index);
hlist_del_rcu(&cic->cic_list);
Expand Down

0 comments on commit 726e99a

Please sign in to comment.