/* frees line-locks and segment locks for all segments in comdata structure. Optionally sets state of file-system to FM_DIRTY in super-block. log age of page-frames in memory for which caller has are reset to 0 (to avoid logwarap).  */
void txAbort(tid_t tid, int dirty)
/* frees line-locks and segment locks for all segments in comdata structure. Optionally sets state of file-system to FM_DIRTY in super-block. log age of page-frames in memory for which caller has are reset to 0 (to avoid logwarap).  */
void txAbort(tid_t tid, int dirty)
{
	lid_t lid, next;
	struct metapage *mp;
	struct tblock *tblk = tid_to_tblock(tid);
	struct tlock *tlck;
	for (lid = tblk->next; lid; lid = next) {
		tlck = lid_to_tlock(lid);
		next = tlck->next;
		mp = tlck->mp;
		JFS_IP(tlck->ip)->xtlid = 0;
		if (mp) {
			mp->lid = 0;
			if (mp->xflag & COMMIT_PAGE && mp->lsn)
				LogSyncRelease(mp);
		}
		TXN_LOCK();
		txLockFree(lid);
		TXN_UNLOCK();
	}
	tblk->next = tblk->last = 0;
	if (dirty)
		jfs_error(tblk->sb, "txAbort");
	return;
}