if (conf) kfree(conf); 
kfree(conf); 
static int linear_run (mddev_t *mddev){	linear_conf_t *conf;	dev_info_t **table;	mdk_rdev_t *rdev;	int i, nb_zone, cnt;	sector_t start;	sector_t curr_offset;	struct list_head *tmp;	conf = kmalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t),			GFP_KERNEL);	if (!conf)		goto out;	memset(conf, 0, sizeof(*conf) + mddev->raid_disks*sizeof(dev_info_t));	mddev->private = conf;	/*	 * Find the smallest device.	 */	conf->smallest = NULL;	cnt = 0;	mddev->array_size = 0;	ITERATE_RDEV(mddev,rdev,tmp) {		int j = rdev->raid_disk;		dev_info_t *disk = conf->disks + j;		if (j < 0 || j > mddev->raid_disks || disk->rdev) {			printk("linear: disk numbering problem. Aborting!\n");			goto out;		}		disk->rdev = rdev;		blk_queue_stack_limits(mddev->queue,				       rdev->bdev->bd_disk->queue);		/* as we don't honour merge_bvec_fn, we must never risk		 * violating it, so limit ->max_sector to one PAGE, as		 * a one page request is never in violation.		 */		if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&		    mddev->queue->max_sectors > (PAGE_SIZE>>9))			blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);		disk->size = rdev->size;		mddev->array_size += rdev->size;		if (!conf->smallest || (disk->size < conf->smallest->size))			conf->smallest = disk;		cnt++;	}	if (cnt != mddev->raid_disks) {		printk("linear: not enough drives present. Aborting!\n");		goto out;	}	/*	 * This code was restructured to work around a gcc-2.95.3 internal	 * compiler error.  Alter it with care.	 */	{		sector_t sz;		unsigned round;		unsigned long base;		sz = mddev->array_size;		base = conf->smallest->size;		round = sector_div(sz, base);		nb_zone = conf->nr_zones = sz + (round ? 1 : 0);	}				conf->hash_table = kmalloc (sizeof (dev_info_t*) * nb_zone,					GFP_KERNEL);	if (!conf->hash_table)		goto out;	/*	 * Here we generate the linear hash table	 */	table = conf->hash_table;	start = 0;	curr_offset = 0;	for (i = 0; i < cnt; i++) {		dev_info_t *disk = conf->disks + i;		disk->offset = curr_offset;		curr_offset += disk->size;		/* 'curr_offset' is the end of this disk		 * 'start' is the start of table		 */		while (start < curr_offset) {			*table++ = disk;			start += conf->smallest->size;		}	}	if (table-conf->hash_table != nb_zone)		BUG();	blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec);	mddev->queue->unplug_fn = linear_unplug;	mddev->queue->issue_flush_fn = linear_issue_flush;	return 0;out:	if (conf)		kfree(conf);	return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/990a8baf568ca1d0ae65e59783ff821794118d07/linear.c/clean/drivers/md/linear.c