infp = kmalloc(sizeof(*infp), GFP_KERNEL); 
infp = kcalloc(1, sizeof(*infp), GFP_KERNEL); 
static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent){	struct vxfs_sb_info	*infp;	struct vxfs_sb		*rsbp;	struct buffer_head	*bp = NULL;	u_long			bsize;	struct inode *root;	sbp->s_flags |= MS_RDONLY;	infp = kmalloc(sizeof(*infp), GFP_KERNEL);	if (!infp) {		printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n");		return -ENOMEM;	}	memset(infp, 0, sizeof(*infp));	bsize = sb_min_blocksize(sbp, BLOCK_SIZE);	if (!bsize) {		printk(KERN_WARNING "vxfs: unable to set blocksize\n");		goto out;	}	bp = sb_bread(sbp, 1);	if (!bp || !buffer_mapped(bp)) {		if (!silent) {			printk(KERN_WARNING				"vxfs: unable to read disk superblock\n");		}		goto out;	}	rsbp = (struct vxfs_sb *)bp->b_data;	if (rsbp->vs_magic != VXFS_SUPER_MAGIC) {		if (!silent)			printk(KERN_NOTICE "vxfs: WRONG superblock magic\n");		goto out;	}	if ((rsbp->vs_version < 2 || rsbp->vs_version > 4) && !silent) {		printk(KERN_NOTICE "vxfs: unsupported VxFS version (%d)\n",		       rsbp->vs_version);		goto out;	}#ifdef DIAGNOSTIC	printk(KERN_DEBUG "vxfs: supported VxFS version (%d)\n", rsbp->vs_version);	printk(KERN_DEBUG "vxfs: blocksize: %d\n", rsbp->vs_bsize);#endif	sbp->s_magic = rsbp->vs_magic;	sbp->s_fs_info = (void *)infp;	infp->vsi_raw = rsbp;	infp->vsi_bp = bp;	infp->vsi_oltext = rsbp->vs_oltext[0];	infp->vsi_oltsize = rsbp->vs_oltsize;	if (!sb_set_blocksize(sbp, rsbp->vs_bsize)) {		printk(KERN_WARNING "vxfs: unable to set final block size\n");		goto out;	}	if (vxfs_read_olt(sbp, bsize)) {		printk(KERN_WARNING "vxfs: unable to read olt\n");		goto out;	}	if (vxfs_read_fshead(sbp)) {		printk(KERN_WARNING "vxfs: unable to read fshead\n");		goto out;	}	sbp->s_op = &vxfs_super_ops;	root = iget(sbp, VXFS_ROOT_INO);	sbp->s_root = d_alloc_root(root);	if (!sbp->s_root) {		iput(root);		printk(KERN_WARNING "vxfs: unable to get root dentry.\n");		goto out_free_ilist;	}	return 0;	out_free_ilist:	vxfs_put_fake_inode(infp->vsi_fship);	vxfs_put_fake_inode(infp->vsi_ilist);	vxfs_put_fake_inode(infp->vsi_stilist);out:	brelse(bp);	kfree(infp);	return -EINVAL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8cb681b9c7fff5cb35b5c05ba4f1b7e285e258fb/vxfs_super.c/buggy/fs/freevxfs/vxfs_super.c