Browse files

Fix atomic functions in bfq

  • Loading branch information...
1 parent f3c0e5f commit 2e38e6c10c22496533f314dbbf084a4ed38c4e12 @damentz damentz committed with rmcc Aug 9, 2010
Showing with 3 additions and 3 deletions.
  1. +2 −2 block/bfq-cgroup.c
  2. +1 −1 block/bfq-iosched.c
View
4 block/bfq-cgroup.c
@@ -669,8 +669,8 @@ static void bfqio_attach(struct cgroup_subsys *subsys, struct cgroup *cgroup,
task_lock(tsk);
ioc = tsk->io_context;
if (ioc != NULL) {
- BUG_ON(atomic_read(&ioc->refcount) == 0);
- atomic_inc(&ioc->refcount);
+ BUG_ON(atomic_long_read(&ioc->refcount) == 0);
+ atomic_long_inc(&ioc->refcount);
}
task_unlock(tsk);
View
2 block/bfq-iosched.c
@@ -1160,7 +1160,7 @@ static int __bfq_dispatch_requests(struct bfq_data *bfqd,
dispatched++;
if (bfqd->active_cic == NULL) {
- atomic_inc(&RQ_CIC(rq)->ioc->refcount);
+ atomic_long_inc(&RQ_CIC(rq)->ioc->refcount);
bfqd->active_cic = RQ_CIC(rq);
}

0 comments on commit 2e38e6c

Please sign in to comment.