int diMount(struct inode *ipimap){	struct inomap *imap;	struct metapage *mp;	int index;	struct dinomap_disk *dinom_le;	/*	 * allocate/initialize the in-memory inode map control structure	 */	/* allocate the in-memory inode map control structure. */	imap = (struct inomap *) kmalloc(sizeof(struct inomap), GFP_KERNEL);	if (imap == NULL) {		jfs_err("diMount: kmalloc returned NULL!");		return -ENOMEM;	}	/* read the on-disk inode map control structure. */	mp = read_metapage(ipimap,			   IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage,			   PSIZE, 0);	if (mp == NULL) {		kfree(imap);		return -EIO;	}	/* copy the on-disk version to the in-memory version. */	dinom_le = (struct dinomap_disk *) mp->data;	imap->im_freeiag = le32_to_cpu(dinom_le->in_freeiag);	imap->im_nextiag = le32_to_cpu(dinom_le->in_nextiag);	atomic_set(&imap->im_numinos, le32_to_cpu(dinom_le->in_numinos));	atomic_set(&imap->im_numfree, le32_to_cpu(dinom_le->in_numfree));	imap->im_nbperiext = le32_to_cpu(dinom_le->in_nbperiext);	imap->im_l2nbperiext = le32_to_cpu(dinom_le->in_l2nbperiext);	for (index = 0; index < MAXAG; index++) {		imap->im_agctl[index].inofree =		    le32_to_cpu(dinom_le->in_agctl[index].inofree);		imap->im_agctl[index].extfree =		    le32_to_cpu(dinom_le->in_agctl[index].extfree);		imap->im_agctl[index].numinos =		    le32_to_cpu(dinom_le->in_agctl[index].numinos);		imap->im_agctl[index].numfree =		    le32_to_cpu(dinom_le->in_agctl[index].numfree);	}	/* release the buffer. */	release_metapage(mp);	/*	 * allocate/initialize inode allocation map locks	 */	/* allocate and init iag free list lock */	IAGFREE_LOCK_INIT(imap);	/* allocate and init ag list locks */	for (index = 0; index < MAXAG; index++) {		AG_LOCK_INIT(imap, index);	}	/* bind the inode map inode and inode map control structure	 * to each other.	 */	imap->im_ipimap = ipimap;	JFS_IP(ipimap)->i_imap = imap;//      DBG_DIINIT(imap);	return (0);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b38a3ab3d1bb0dc3288f73903d4dc4672b5cd2d0/jfs_imap.c/clean/fs/jfs/jfs_imap.c