ubh_wait_on_buffer (UCPI_UBH); ubh_ll_rw_block (WRITE, 1, (struct ufs_buffer_head **)&ucpi); 
ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **)&ucpi); 
void ufs_free_blocks (struct inode * inode, unsigned fragment, unsigned count) {	struct super_block * sb;	struct ufs_sb_private_info * uspi;	struct ufs_super_block_first * usb1;	struct ufs_cg_private_info * ucpi;	struct ufs_cylinder_group * ucg;	unsigned overflow, cgno, bit, end_bit, blkno, i, cylno;		sb = inode->i_sb;	uspi = UFS_SB(sb)->s_uspi;	usb1 = ubh_get_usb_first(USPI_UBH);	UFSD(("ENTER, fragment %u, count %u\n", fragment, count))		if ((fragment & uspi->s_fpbmask) || (count & uspi->s_fpbmask)) {		ufs_error (sb, "ufs_free_blocks", "internal error, "			"fragment %u, count %u\n", fragment, count);		goto failed;	}	lock_super(sb);	do_more:	overflow = 0;	cgno = ufs_dtog (fragment);	bit = ufs_dtogd (fragment);	if (cgno >= uspi->s_ncg) {		ufs_panic (sb, "ufs_free_blocks", "freeing blocks are outside device");		goto failed;	}	end_bit = bit + count;	if (end_bit > uspi->s_fpg) {		overflow = bit + count - uspi->s_fpg;		count -= overflow;		end_bit -= overflow;	}	ucpi = ufs_load_cylinder (sb, cgno);	if (!ucpi) 		goto failed;	ucg = ubh_get_ucg (UCPI_UBH);	if (!ufs_cg_chkmagic(sb, ucg)) {		ufs_panic (sb, "ufs_free_blocks", "internal error, bad magic number on cg %u", cgno);		goto failed;	}	for (i = bit; i < end_bit; i += uspi->s_fpb) {		blkno = ufs_fragstoblks(i);		if (ubh_isblockset(UCPI_UBH, ucpi->c_freeoff, blkno)) {			ufs_error(sb, "ufs_free_blocks", "freeing free fragment");		}		ubh_setblock(UCPI_UBH, ucpi->c_freeoff, blkno);		if ((UFS_SB(sb)->s_flags & UFS_CG_MASK) == UFS_CG_44BSD)			ufs_clusteracct (sb, ucpi, blkno, 1);		DQUOT_FREE_BLOCK(inode, uspi->s_fpb);		fs32_add(sb, &ucg->cg_cs.cs_nbfree, 1);		fs32_add(sb, &usb1->fs_cstotal.cs_nbfree, 1);		fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nbfree, 1);		cylno = ufs_cbtocylno(i);		fs16_add(sb, &ubh_cg_blks(ucpi, cylno, ufs_cbtorpos(i)), 1);		fs32_add(sb, &ubh_cg_blktot(ucpi, cylno), 1);	}	ubh_mark_buffer_dirty (USPI_UBH);	ubh_mark_buffer_dirty (UCPI_UBH);	if (sb->s_flags & MS_SYNCHRONOUS) {		ubh_wait_on_buffer (UCPI_UBH);		ubh_ll_rw_block (WRITE, 1, (struct ufs_buffer_head **)&ucpi);		ubh_wait_on_buffer (UCPI_UBH);	}	if (overflow) {		fragment += count;		count = overflow;		goto do_more;	}	sb->s_dirt = 1;	unlock_super (sb);	UFSD(("EXIT\n"))	return;failed:	unlock_super (sb);	UFSD(("EXIT (FAILED)\n"))	return;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/096125f31ae3aa2c7271463b9986dd228e0da089/balloc.c/clean/fs/ufs/balloc.c