atomic_inc(&q->refcnt); 
static int cfq_init_queue(request_queue_t *q, elevator_t *e){	struct cfq_data *cfqd;	int i;	cfqd = kmalloc(sizeof(*cfqd), GFP_KERNEL);	if (!cfqd)		return -ENOMEM;	memset(cfqd, 0, sizeof(*cfqd));	for (i = 0; i < CFQ_PRIO_LISTS; i++)		INIT_LIST_HEAD(&cfqd->rr_list[i]);	INIT_LIST_HEAD(&cfqd->busy_rr);	INIT_LIST_HEAD(&cfqd->cur_rr);	INIT_LIST_HEAD(&cfqd->idle_rr);	INIT_LIST_HEAD(&cfqd->empty_list);	cfqd->crq_hash = kmalloc(sizeof(struct hlist_head) * CFQ_MHASH_ENTRIES, GFP_KERNEL);	if (!cfqd->crq_hash)		goto out_crqhash;	cfqd->cfq_hash = kmalloc(sizeof(struct hlist_head) * CFQ_QHASH_ENTRIES, GFP_KERNEL);	if (!cfqd->cfq_hash)		goto out_cfqhash;	cfqd->crq_pool = mempool_create(BLKDEV_MIN_RQ, mempool_alloc_slab, mempool_free_slab, crq_pool);	if (!cfqd->crq_pool)		goto out_crqpool;	for (i = 0; i < CFQ_MHASH_ENTRIES; i++)		INIT_HLIST_HEAD(&cfqd->crq_hash[i]);	for (i = 0; i < CFQ_QHASH_ENTRIES; i++)		INIT_HLIST_HEAD(&cfqd->cfq_hash[i]);	e->elevator_data = cfqd;	cfqd->queue = q;	atomic_inc(&q->refcnt);	cfqd->max_queued = q->nr_requests / 4;	q->nr_batching = cfq_queued;	init_timer(&cfqd->idle_slice_timer);	cfqd->idle_slice_timer.function = cfq_idle_slice_timer;	cfqd->idle_slice_timer.data = (unsigned long) cfqd;	init_timer(&cfqd->idle_class_timer);	cfqd->idle_class_timer.function = cfq_idle_class_timer;	cfqd->idle_class_timer.data = (unsigned long) cfqd;	INIT_WORK(&cfqd->unplug_work, cfq_kick_queue, q);	atomic_set(&cfqd->ref, 1);	cfqd->cfq_queued = cfq_queued;	cfqd->cfq_quantum = cfq_quantum;	cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0];	cfqd->cfq_fifo_expire[1] = cfq_fifo_expire[1];	cfqd->cfq_back_max = cfq_back_max;	cfqd->cfq_back_penalty = cfq_back_penalty;	cfqd->cfq_slice[0] = cfq_slice_async;	cfqd->cfq_slice[1] = cfq_slice_sync;	cfqd->cfq_slice_async_rq = cfq_slice_async_rq;	cfqd->cfq_slice_idle = cfq_slice_idle;	cfqd->cfq_max_depth = cfq_max_depth;	return 0;out_crqpool:	kfree(cfqd->cfq_hash);out_cfqhash:	kfree(cfqd->crq_hash);out_crqhash:	kfree(cfqd);	return -ENOMEM;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/38f18527592756d24a12e84c0713e8c902ba7f15/cfq-iosched.c/buggy/drivers/block/cfq-iosched.c