/* function: allocate a transaction lock for log vector list  */
struct linelock* txLinelock(struct linelock *tlock)
/* function: allocate a transaction lock for log vector list  */
struct linelock* txLinelock(struct linelock *tlock)
{
	lid_t lid;
	struct tlock *tlck;
	struct linelock *linelock;
	TXN_LOCK();
	lid = txLockAlloc();
	tlck = lid_to_tlock(lid);
	TXN_UNLOCK();
	linelock = (struct linelock *) tlck;
	linelock->next = 0;
	linelock->flag = tlckLINELOCK;
	linelock->maxcnt = TLOCKLONG;
	linelock->index = 0;
	if (tlck->flag & tlckDIRECTORY)
		linelock->flag |= tlckDIRECTORY;
	linelock->next = tlock->next;
	tlock->next = lid;
	return linelock;
}