/* Changes an entry in the directory index table  */
static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, int slot, struct metapage **mp, s64 *lblock)
/* Changes an entry in the directory index table  */
static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, int slot, struct metapage **mp, s64 *lblock)
{
	struct dir_table_slot *dirtab_slot;
	dirtab_slot = find_index(ip, index, mp, lblock);
	if (!dirtab_slot)
		return;
	DTSaddress(dirtab_slot, bn);
	dirtab_slot->slot = slot;
	if (*mp) {
		lock_index(tid, ip, *mp, index);
		mark_metapage_dirty(*mp);
	} else
		set_cflag(COMMIT_Dirtable, ip);
}