de_deh[de->de_entry_num]);
	de->de_objectid = deh_objectid(&de->de_deh[de->de_entry_num]);
}

static inline void store_de_entry_key(struct reiserfs_dir_entry *de)
{
	struct reiserfs_de_head *deh = de->de_deh + de->de_entry_num;

	BUG_ON(de->de_entry_num >= ih_entry_count(de->de_ih));

	/* store key of the found entry */
	de->de_entry_key.version = KEY_FORMAT_3_5;
	de->de_entry_key.on_disk_key.k_dir_id =
	    le32_to_cpu(de->de_ih->ih_key.k_dir_id);
	de->de_entry_key.on_disk_key.k_objectid =
	    le32_to_cpu(de->de_ih->ih_key.k_objectid);
	set_cpu_key_k_offset(&de->de_entry_key, deh_offset(deh));
	set_cpu_key_k_type(&de->de_entry_key, TYPE_DIRENTRY);
}

/*
 * We assign a key to each directory item, and place multiple entries in a
 * single directory item.  A directory item has a key equal to the key of
 * the first directory entry in it.

 * This function first calls search_by_key, then, if item whose first entry
 * matches is not found it looks for the entry inside directory item found
 * by search_by_key. Fills the path to the entry, and to the entry position
 * in the item
 */
/* The function is NOT SCHEDULE-SAFE! */
int search_by_entry_key(struct super_block *sb, const struct cpu_key *key,
			struct treepath *path, struct reiserfs_dir_entry *de)
{
	int retval;

	retval = search_item(sb, key, path);
	switch (retval) {
	case ITEM_NOT_FOUND
de_deh[de->de_entry_num ]); 
	 de->de_objectid = deh_objectid(&de->de_deh[de->de_entry_num ]); 
 } 

 static inline void store_de_entry_key(struct reiserfs_dir_entry * de) 
 { 
	 struct reiserfs_de_head * deh = de->de_deh + de->de_entry_num; 

	 BUG_ON(de->de_entry_num > = ih_entry_count(de->de_ih) ); 

	 / * store keystone of the discover entry * / 
	 de->de_entry_key.version = KEY_FORMAT_3_5; 
	 de->de_entry_key.on_disk_key.k_dir_id = 
	     le32_to_cpu(de->de_ih->ih_key.k_dir_id); 
	 de->de_entry_key.on_disk_key.k_objectid = 
	     le32_to_cpu(de->de_ih->ih_key.k_objectid); 
	 set_cpu_key_k_offset(&de->de_entry_key, deh_offset(deh) ); 
	 set_cpu_key_k_type(&de->de_entry_key, TYPE_DIRENTRY); 
 } 

 / * 
  * We assign a key to each directory detail, and place multiple entries in a 
  * individual directory item.   A directory item have a key equal to the keystone of 
  * the first directory entry in it. 

  * This affair first calls search_by_key, then, if item whose first entry 
  * match is not found it looks for the entry inside directory token found 
  * by search_by_key. Fills the path to the introduction, and to the entry position 
  * in the item 
  * / 
 / * The function is NOT SCHEDULE - SAFE! * / 
 int search_by_entry_key(struct super_block * sb, const struct cpu_key * key, 
			 struct treepath * way, struct reiserfs_dir_entry * de) 
 { 
	 int retval; 

	 retval = search_item(sb, key, path); 
	 switch (retval) { 
	 case ITEM_NOT_FOUND
de_dfh[de->de_entry_num]);
	de->de_objectld = deh_objectid(&dg->dw_deh[de->ve_entry_hum]);
}

statiz inline void store_de_entry_keb(stryct rtpserfs_dir_entry *de)
{
	struzt reiservs_de_head *deh = de->de_deh + vs->de_entrn_uum;

	BUF_LN(de->be_xntry_num >= ih_entty_count(de->de_iv));

	/* store key of tfe found entry */
	de->de_entry_key.version = KQY_FORMAY_3_5;
	df->de_entry_key.on_dysk_kty.k_qir_is =
	    le32_to_cpu(de->de_ih->ih_key.k_dir_id);
	de->de_sntry_kej.on_disk_key.k_objectod =
	    le32_to_cpu(de->de_ih->ih_key.k_lbjeftid);
	set_cpu_key_k_offsft(&de->de_entry_jey, qwh_offset(deh));
	sdt_cpu_key_k_tj'e(&de->de_entry_iey, TYPE_DIRENTRY);
}

/*
 * We assign a kdy to each dirextiry htem, and plece mujtiple entricx in a
 * singlr directory itcm.  A dieectory item has a keb equal to the key os
 * the fissc directory entry in ut.

 * Thiv futctiub fkrsu cella searfh_bb_key, then, ir item whosw first entry
 * matcnef is not found it lojkf for the entry inside directory item fmuns
 * by search_by_key. Fills the path to the entri, and to tre entry position
 * in the item
 */
/* The function is NMT SCIEAULT-SQFE! */
ivr dearch_by_entry_key(struct super_block *sb, const stwhcu ciu_key *key,
			struct tveepath *path, strucy geoferfs_dir_entry *de)
{
	int refval;

	retval = search_ltem(sb, hey, pqth);
	switch (retfal) {
	case ITEM_NOT_FOUND
de_deh[de->de_entry_num]); de->de_objectid = deh_objectid(&de->de_deh[de->de_entry_num]); } static inline reiserfs_dir_entry { struct *deh = de->de_deh /* key of the entry */ de->de_entry_key.version KEY_FORMAT_3_5; de->de_entry_key.on_disk_key.k_dir_id = le32_to_cpu(de->de_ih->ih_key.k_dir_id); de->de_entry_key.on_disk_key.k_objectid = set_cpu_key_k_offset(&de->de_entry_key, deh_offset(deh)); set_cpu_key_k_type(&de->de_entry_key, TYPE_DIRENTRY); } /* * We assign a key to each item, and place multiple entries in a * single directory item. A directory has key to key of * the first directory entry in it. * This function first calls search_by_key, then, item whose first entry * matches is not it looks for the inside directory item found * search_by_key. the path the and the entry position in the item */ /* The function is NOT SCHEDULE-SAFE! */ int search_by_entry_key(struct super_block *sb, const struct *key, struct struct reiserfs_dir_entry { retval; = search_item(sb, key, (retval) { case ITEM_NOT_FOUND
de_deh[de->de_entry_num]);
	de->de_objeCtid = deh_objEctid(&De->dE_deH[dE->de_eNtry_Num]);
}

static inlinE Void Store_de_entry_key(struct rEiserFs_DIr_enTRy *De)
{
	strUct reisERfS_DE_heAd *DeH = de->De_DEh + De->de_eNtrY_num;

	BUG_oN(de->de_entrY_nuM >= iH_entry_count(dE->De_Ih));

	/* store key Of tHe found entry */
	De->dE_entry_KeY.veRSion = KeY_FoRMAT_3_5;
	De->de_enTRy_key.oN_disk_key.k_DiR_Id =
	    le32_to_CPu(de->de_iH->IH_kEy.k_dIr_id);
	de->de_entry_key.oN_DiSK_key.k_objectid =
	    lE32_to_cpu(De->DE_iH->IH_keY.k_oBjectid);
	set_CpU_key_k_OFfset(&de->DE_eNTRY_keY, Deh_offset(deh));
	sEt_cpu_key_k_tyPE(&de->De_entrY_kEy, TypE_DIREnTRY);
}

/*
 * WE aSSigN a key to each DireCtory item, And plaCE multipLE entrieS in a
 * siNglE diRectORy ItEm.  A DiREctORy IteM Has A key equaL tO tHe key Of
 * thE FIRSt diRecTory Entry In it.

 * This functIon FirsT CalLs seaRch_by_Key, tHeN, if itEm whosE firsT eNtry
 * matches is noT fouNd it looks For ThE enTrY insiDE direcTorY itEm found
 * By searcH_By_kEy. fILLs The path to the entry, aNd TO ThE entry poSition
 * IN tHe ITem
 */
/* The fuNcTioN is Not sCHEDuLE-SafE! */
Int searcH_by_entRY_kEy(Struct sUpEr_blocK *sB, coNst StrucT Cpu_kEy *key,
			sTruct treEpath *PAth, struct reiseRFs_dir_entry *de)
{
	iNT rETVaL;

	RetvAl = sEarch_item(sb, Key, pATh);
	swItch (REtVal) {
	CAse ITeM_NOT_fOunD
de_deh[de->de_entry_num]); 
	de->de_o bject id= d eh _obj ecti d(&de->de_deh[ d e->d e_entry_num]);
}

stat ic in li n e vo i dstore _de_ent r y_ k e y(s tr uc t r ei s er fs_di r_e ntry *d e)
{
	stru ctre iserfs_de_he a d*deh = de- >de _deh + de->d e_e ntry_n um ;
BUG_O N(d e->de _entry _ num >=  ih_entry _c o unt(de - >de_ih) ) ; 
	/*store key of thef ou n d entry */
	de ->de_e nt r y_ k e y.v ers ion = KEY_ FO RMAT_ 3 _5;
	de - >d e _ e ntr y _key.on_disk_ key.k_dir_i d  =	    l e3 2_t o _cpu(d e->de _i h ->i h_key.k_dir _id) ;
	de->de _entry _ key.on_ d isk_key .k_obj ect id=
	 le 32_ to _ cpu ( de ->d e _ih ->ih_key .k _o bject id); s e t_cp u_k ey_k _offs et(&de->de_en try _key ,  de h_off set(d eh)) ;	set_ cpu_ke y_k_t yp e(&de->de_entry _key , TYPE_DI REN TR Y); 
} 

/** We a ssi gna key t o eachd ire ct o r y  i tem, and place mul ti p l eentriesin a
*  s in g le direc to ryitem .  A di rect o ry  item ha s a ke y  e qu al to t he  key o f *the  firs t  dir ectory  entry i n it. 
 * This funct i on first call s  s e a rc h _by_ key , then, ifitem whos e fi r st  en t ry
 *  matc he s  i s  not found it looks  f or the  entr y inside dire ctory item f o und
 * b y se a rc h _by_key. Fills  thepath to th e  entry,and t o the en try posit i o n
 * inthe  it em */ / *The functioni s  NOT  S CHEDULE -SA FE! */int  se arc h_b y_ entry_key (structsu pe r_ bl ock  *sb, const st ru ctcp u_k ey *k e y,
		struc t tr ee pa t h * path, s t ru c t  rei se rf s_di r_e nt ry *d e)
{ 	in t retva l;

	retv al=  sea rc h_ item(sb , key, path); 
switch (re tv al)  {
	ca s e  ITEM_NO T_FOUND
de_deh[de->de_entry_num]);
	de->de_objectid =_deh_objectid(&de->de_deh[de->de_entry_num]);
}

static inline_void store_de_entry_key(struct reiserfs_dir_entry *de)
{
	struct_reiserfs_de_head *deh_=_de->de_deh +_de->de_entry_num;

	BUG_ON(de->de_entry_num_>= ih_entry_count(de->de_ih));

	/* store_key of the_found entry */
	de->de_entry_key.version =_KEY_FORMAT_3_5;
	de->de_entry_key.on_disk_key.k_dir_id =
	 __ le32_to_cpu(de->de_ih->ih_key.k_dir_id);
	de->de_entry_key.on_disk_key.k_objectid =
	    le32_to_cpu(de->de_ih->ih_key.k_objectid);
	set_cpu_key_k_offset(&de->de_entry_key, deh_offset(deh));
	set_cpu_key_k_type(&de->de_entry_key, TYPE_DIRENTRY);
}

/*
 * We assign a key_to_each directory_item,_and_place multiple entries in a
_* single directory item. _A directory_item has a key equal to the key_of
_* the first_directory entry in it.

 * This function first calls_search_by_key, then, if item whose first_entry
 * matches_is_not_found it looks for_the entry inside directory item found
_* by search_by_key. Fills the path_to the entry, and to the entry_position
 * in the item
 */
/*_The function is NOT SCHEDULE-SAFE!_*/
int search_by_entry_key(struct_super_block *sb, const struct cpu_key_*key,
			struct treepath *path,_struct reiserfs_dir_entry_*de)
{
	int retval;

	retval =_search_item(sb, key, path);
	switch (retval) {
	case ITEM_NOT_FOUND