block: prevent possible io_context->refcount overflow
[linux-2.6.git] / block / cfq-iosched.c
index 99ac430..ef2f72d 100644 (file)
@@ -1282,7 +1282,7 @@ static void cfq_dispatch_request(struct cfq_data *cfqd, struct cfq_queue *cfqq)
        if (!cfqd->active_cic) {
                struct cfq_io_context *cic = RQ_CIC(rq);
 
-               atomic_inc(&cic->ioc->refcount);
+               atomic_long_inc(&cic->ioc->refcount);
                cfqd->active_cic = cic;
        }
 }