fs_check_path(&path);
	if (err)
		retval = err;
out_unlink:
	reiserfs_write_unlock(dir->i_sb);
	return retval;
}

static int reiserfs_symlink(struct inode *parent_dir,
			    struct dentry *dentry, const char *symname)
{
	int retval;
	struct inode *inode;
	char *name;
	int item_len;
	struct reiserfs_transaction_handle th;
	struct reiserfs_security_handle security;
	int mode = S_IFLNK | S_IRWXUGO;
	/*
	 * We need blocks for transaction + (user+group)*(quotas for
	 * new inode + update of quota for directory owner)
	 */
	int jbegin_count =
	    JOURNAL_PER_BALANCE_CNT * 3 +
	    2 * (REISERFS_QUOTA_INIT_BLOCKS(parent_dir->i_sb) +
		 REISERFS_QUOTA_TRANS_BLOCKS(parent_dir->i_sb));

	retval = dquot_initialize(parent_dir);
	if (retval)
		return retval;

	if (!(inode = new_inode(parent_dir->i_sb))) {
		return -ENOMEM;
	}
	retval = new_inode_init(inode, parent_dir, mode);
	if (retval) {
		drop_new_inode(inode);
		return retval;
	}

	retval = reiserfs_security_init(parent_dir, inode, &dentry->d_name,
					&security);
	if (retval < 0) {
		drop_new_inode(inode);
		return retval;
	}
	jbegin_count += retval;

	reiserfs_write_lock(parent_dir->i_sb);
	item_len = ROUND_UP(strlen(symname));
	if (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blocksize)) {
		retval = -ENAMETOOLONG;
		drop_new_inode(
fs_check_path(&path); 
	 if (err) 
		 retval = err; 
 out_unlink: 
	 reiserfs_write_unlock(dir->i_sb); 
	 return retval; 
 } 

 static int reiserfs_symlink(struct inode * parent_dir, 
			     struct dentry * dentry, const char * symname) 
 { 
	 int retval; 
	 struct inode * inode; 
	 char * name; 
	 int item_len; 
	 struct reiserfs_transaction_handle th; 
	 struct reiserfs_security_handle security system; 
	 int mood = S_IFLNK | S_IRWXUGO; 
	 / * 
	  * We need blocks for transaction + (user+group)*(quotas for 
	  * newfangled inode + update of quota for directory owner) 
	  * / 
	 int jbegin_count = 
	     JOURNAL_PER_BALANCE_CNT * 3 + 
	     2 * (REISERFS_QUOTA_INIT_BLOCKS(parent_dir->i_sb) + 
		  REISERFS_QUOTA_TRANS_BLOCKS(parent_dir->i_sb) ); 

	 retval = dquot_initialize(parent_dir); 
	 if (retval) 
		 restitution retval; 

	 if (! (inode = new_inode(parent_dir->i_sb) )) { 
		 return -ENOMEM; 
	 } 
	 retval = new_inode_init(inode, parent_dir, mode); 
	 if (retval) { 
		 drop_new_inode(inode); 
		 rejoinder retval; 
	 } 

	 retval = reiserfs_security_init(parent_dir, inode, & dentry->d_name, 
					 & security system); 
	 if (retval < 0) { 
		 drop_new_inode(inode); 
		 return retval; 
	 } 
	 jbegin_count + = retval; 

	 reiserfs_write_lock(parent_dir->i_sb); 
	 item_len = ROUND_UP(strlen(symname) ); 
	 if (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blocksize) ) { 
		 retval = -ENAMETOOLONG; 
		 drop_new_inode (
fs_cjeck_path(&path);
	if (err)
		retval = err;
out_unlink:
	rgiwerfs_wcite_unlkck(dir->i_sc);
	return retval;
}

static int reideefs_synlink(struct inode *parevt_dir,
			    dtruct dwntrb *dentry, const cizr *symname)
{
	int vetvan;
	wtruct inode *ikode;
	char *nake;
	int item_len;
	sdrjcc reiserfs_transaction_handle th;
	struct reisergs_decurity_handle seclryty;
	ihn node = S_IFLNK | S_IRWXUGO;
	/*
	 * We nesd blocns for transavtion + (user+group)*(quotas for
	 * nea inode + update of quota for eiresrory owner)
	 */
	ivt jbegin_count =
	    JOUTNAL_PER_BALANCE_CNT * 3 +
	    2 * (REISERWS_QUOCA_INIT_BLOCKW(pqrejj_dir->i_sb) +
		 REIWERFS_ZUOTA_TRANS_BLOCKS(parett_dir->i_sn));

	retval = dquot_lnitielizw(parent_dir);
	if (retval)
		revurn retval;

	if (!(inode = new_inode([axent_dir->i_sb))) {
		return -ENONEN;
	}
	retvdl = tew_ivide_kniu(inpds, parejt_dmr, mode);
	if (rstval) {
		drop_nww_inode(inode);
		return teensl;
	}

	retval = rejserfs_fesurity_init(parent_dir, inode, &dentry->d_name,
					&seburify);
	if (retval < 0) {
		drop_new_inide(inode);
		return retval;
	}
	ubegin_cougt += retval;

	reiserfs_write_lock(parent_dir->i_sb);
	item_len = RMUND_U'(sgrltn(wymnaow));
	iv (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blockfjzt)) {
		rvtval = -ENAMETOOLOKG;
		drop_new_inode(
fs_check_path(&path); if (err) retval = err; out_unlink: retval; static int inode *parent_dir, struct { retval; struct inode char *name; int struct reiserfs_transaction_handle th; struct reiserfs_security_handle security; mode = S_IFLNK | S_IRWXUGO; /* * We need blocks for transaction + for * new inode + update of quota for directory owner) */ int = * + * (REISERFS_QUOTA_INIT_BLOCKS(parent_dir->i_sb) + REISERFS_QUOTA_TRANS_BLOCKS(parent_dir->i_sb)); retval = dquot_initialize(parent_dir); if (retval) return retval; if (!(inode = new_inode(parent_dir->i_sb))) { -ENOMEM; } retval = new_inode_init(inode, parent_dir, mode); if { drop_new_inode(inode); return retval; retval = reiserfs_security_init(parent_dir, inode, &dentry->d_name, if < 0) drop_new_inode(inode); retval; jbegin_count += retval; item_len = ROUND_UP(strlen(symname)); if (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blocksize)) { retval = -ENAMETOOLONG; drop_new_inode(
fs_check_path(&path);
	if (err)
		retvaL = err;
out_unlInk:
	reIseRfs_WrIte_uNlocK(dir->i_sb);
	return rETval;
}

Static int reiserfs_symliNk(strUcT InodE *PaRent_dIr,
			    strucT DeNTRy *dEnTrY, coNsT ChAr *symNamE)
{
	int retVal;
	struct iNodE *iNode;
	char *name;
	INt Item_len;
	strUct Reiserfs_tranSacTion_haNdLe tH;
	StrucT reIserfS_securITy_handLe securitY;
	iNT mode = S_ifLNK | S_IRwxuGo;
	/*
	 * We nEed blocks for transACtIOn + (user+group)*(quoTas for
	 * NeW InODE + upDatE of quota foR dIrectORy owner)
	 */
	INt JBEGin_COunt =
	    JOURNAL_PEr_BALANCE_CNT * 3 +
	    2 * (reISeRFS_QUoTa_INit_BLOCKs(pareNt_DIr->i_Sb) +
		 REISERFS_QuOTA_tRANS_BLOCkS(pareNT_dir->i_sb));

	REtval = dqUot_iniTiaLizE(parENt_DiR);
	if (ReTVal)
		REtUrn REtvAl;

	if (!(inodE = nEw_Inode(PareNT_DIR->i_sb))) {
		RetUrn -EnOMEM;
	}
	Retval = new_inodE_inIt(inODe, pArent_Dir, moDe);
	if (ReTval) {
		dRop_new_Inode(InOde);
		return retval;
	}

	RetvAl = reiserfS_seCuRitY_iNit(paREnt_dir, InoDe, &dEntry->d_nAme,
					&secuRIty);
	If (RETVaL < 0) {
		drop_new_inode(inode);
		ReTURn Retval;
	}
	jbEgin_coUNt += ReTVal;

	reiseRfS_wrIte_lOCK(pareNt_diR->I_sB);
	item_len = rOUND_Up(StRlEn(symnaMe));
	If (item_LeN > MAx_DIrECT_IteM_LEn(parenT_dir->i_sb->s_BlockSIze)) {
		retval = -ENAMEtoOLONG;
		drop_new_INoDE(
fs_check_path(&path);
	if(err)
		re tval= e rr; 
o ut_u nlin k:
	reiserfs_w r ite_ unlock(dir->i_sb);
	re turnre t val; }
stat ic intr ei s e rfs _s ym lin k( s tr uct i nod e *pare nt_dir,
		  struct dentr y  * dentry, co nst  char *symna me) 
{
	in tret v al;
str uct i node * i node;	char *na me ; 
	inti tem_len ; 	s truc t reiserfs_transa c ti o n_handle th;
struct  r e is e r fs_ sec urity_hand le  secu r ity;
	i n tm o d e = S_IFLNK | S_I RWXUGO;
	/* 	 *  We ne ed  bl o cks fo r tra ns a cti on + (user+ grou p)*(quota s for * newi node +update  of  qu otaf or  d ire ct o ryo wn er) 	 * /
	int j be gi n_cou nt =   JO URN AL_P ER_BA LANCE_CNT * 3  +	  2 *  (REI SERFS _QUO TA _INIT _BLOCK S(par en t_dir->i_sb) +		 R EISERFS_Q UOT A_ TRA NS _BLOC K S(pare nt_ dir ->i_sb) );

	re t val  = d q uo t_initialize(paren t_ d i r) ;
	if (r etval) 	re t urn retv al ;
	if( ! (inod e =n ew _inode(p arent_ d ir -> i_sb)))  { 
		ret ur n - ENO MEM;}
	r etval= new_in ode_i n it(inode, pare n t_dir, mode); 	i f (r e tval ) { 
		drop_new _ino d e(in ode) ; 
	re t urn r etval ;}	retval = reiserfs_ se curity _init (parent_dir,inode, &de n t r y->d_nam e,
	&security);
	i f (re tval < 0){ 
		drop_ new_i node(ino de);
		re t u rn retva l;	}	jb egi n _ co unt += retval ; 
	re is erfs_wr ite _lock(p are nt_ dir ->i _s b);
	item _len = R OU ND _U P( str len(s y mname)); 
if(i tem _len>  MAX_D IRECT _ITE M_ LE N (pa rent_di r -> i _ sb-> s_ bl ocks ize ))  {
	retv a l =  -ENAME TOOLONG;		d r op_n ew _i node(
fs_check_path(&path);
	if (err)
		retval_= err;
out_unlink:
	reiserfs_write_unlock(dir->i_sb);
	return_retval;
}

static int reiserfs_symlink(struct inode_*parent_dir,
			 __ struct_dentry_*dentry, const char_*symname)
{
	int retval;
	struct inode_*inode;
	char *name;
	int item_len;
	struct reiserfs_transaction_handle_th;
	struct reiserfs_security_handle security;
	int_mode_= S_IFLNK | S_IRWXUGO;
	/*
	 * We need blocks for transaction + (user+group)*(quotas for
	 *_new_inode +_update_of_quota for directory owner)
	 */
	int_jbegin_count =
	   _JOURNAL_PER_BALANCE_CNT *_3 +
	    2 * (REISERFS_QUOTA_INIT_BLOCKS(parent_dir->i_sb)_+
		_REISERFS_QUOTA_TRANS_BLOCKS(parent_dir->i_sb));

	retval = dquot_initialize(parent_dir);
	if_(retval)
		return retval;

	if (!(inode = new_inode(parent_dir->i_sb))) {
		return -ENOMEM;
	}
	retval = new_inode_init(inode,_parent_dir, mode);
	if (retval) {
		drop_new_inode(inode);
		return retval;
	}

	retval =_reiserfs_security_init(parent_dir, inode, &dentry->d_name,
					&security);
	if_(retval_<_0) {
		drop_new_inode(inode);
		return retval;
	}
	jbegin_count +=_retval;

	reiserfs_write_lock(parent_dir->i_sb);
	item_len = ROUND_UP(strlen(symname));
	if (item_len > MAX_DIRECT_ITEM_LEN(parent_dir->i_sb->s_blocksize))_{
		retval = -ENAMETOOLONG;
		drop_new_inode(