aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-02-15 03:45:49 -0500
committerJens Axboe <axboe@kernel.dk>2012-02-15 03:45:49 -0500
commitd705ae6b133f9f6a8beee617b1224b6a5c99c5da (patch)
treeb1a0b09ae01f8385e66c021c338106b88e8d23f8 /block/cfq-iosched.c
parent7ada1dd62804ca9ce1cb8666c6e563cd92fa50c1 (diff)
block: replace icq->changed with icq->flags
icq->changed was used for ICQ_*_CHANGED bits. Rename it to flags and access it under ioc->lock instead of using atomic bitops. ioc_get_changed() is added so that the changed part can be fetched and cleared as before. icq->flags will be used to carry other flags. Signed-off-by: Tejun Heo <tj@kernel.org> Tested-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d0ba50533668..457295253566 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3470,20 +3470,20 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
3470 const int rw = rq_data_dir(rq); 3470 const int rw = rq_data_dir(rq);
3471 const bool is_sync = rq_is_sync(rq); 3471 const bool is_sync = rq_is_sync(rq);
3472 struct cfq_queue *cfqq; 3472 struct cfq_queue *cfqq;
3473 unsigned int changed;
3473 3474
3474 might_sleep_if(gfp_mask & __GFP_WAIT); 3475 might_sleep_if(gfp_mask & __GFP_WAIT);
3475 3476
3476 spin_lock_irq(q->queue_lock); 3477 spin_lock_irq(q->queue_lock);
3477 3478
3478 /* handle changed notifications */ 3479 /* handle changed notifications */
3479 if (unlikely(cic->icq.changed)) { 3480 changed = icq_get_changed(&cic->icq);
3480 if (test_and_clear_bit(ICQ_IOPRIO_CHANGED, &cic->icq.changed)) 3481 if (unlikely(changed & ICQ_IOPRIO_CHANGED))
3481 changed_ioprio(cic); 3482 changed_ioprio(cic);
3482#ifdef CONFIG_CFQ_GROUP_IOSCHED 3483#ifdef CONFIG_CFQ_GROUP_IOSCHED
3483 if (test_and_clear_bit(ICQ_CGROUP_CHANGED, &cic->icq.changed)) 3484 if (unlikely(changed & ICQ_CGROUP_CHANGED))
3484 changed_cgroup(cic); 3485 changed_cgroup(cic);
3485#endif 3486#endif
3486 }
3487 3487
3488new_queue: 3488new_queue:
3489 cfqq = cic_to_cfqq(cic, is_sync); 3489 cfqq = cic_to_cfqq(cic, is_sync);