->rd_free_clone = rgd->rd_free;
	rgd->rd_extfail_pt = rgd->rd_free;
}

/**
 * gfs2_unpin - Unpin a buffer
 * @sdp: the filesystem the buffer belongs to
 * @bh: The buffer to unpin
 * @ai:
 * @flags: The inode dirty flags
 *
 */

static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
		       struct gfs2_ail *ai)
{
	struct gfs2_bufdata *bd = bh->b_private;

	BUG_ON(!buffer_uptodate(bh));
	BUG_ON(!buffer_pinned(bh));

	lock_buffer(bh);
	mark_buffer_dirty(bh);
	clear_buffer_pinned(bh);

	if (buffer_is_rgrp(bd))
		maybe_release_space(bd);

	spin_lock(&sdp->sd_ail_lock);
	if (bd->bd_ail) {
		list_del(&bd->bd_ail_st_list);
		brelse(bh);
	} else {
		struct gfs2_glock *gl = bd->bd_gl;
		list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list);
		atomic_inc(&gl->gl_ail_count);
	}
	bd->bd_ail = ai;
	list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list);
	spin_unlock(&sdp->sd_ail_lock);

	clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
	trace_gfs2_pin(bd, 0);
	unlock_buffer(bh);
}


static inline struct gfs2_log_descriptor *bh_log_desc(struct buffer_head *bh)
{
	return (struct gfs2_log_descriptor *)bh->b_data;
}

static inline __be64 *bh_log_ptr(struct buffer
->rd_free_clone = rgd->rd_free; 
	 rgd->rd_extfail_pt = rgd->rd_free; 
 } 

 / * * 
  * gfs2_unpin - Unpin a buffer 
  * @sdp: the filesystem the buffer belongs to 
  * @bh: The buffer to unpin 
  * @ai: 
  * @flags: The inode cheating iris 
  * 
  * / 

 static void gfs2_unpin(struct gfs2_sbd * sdp, struct buffer_head * bohrium, 
		        struct gfs2_ail * ai) 
 { 
	 struct gfs2_bufdata * bd = bh->b_private; 

	 BUG_ON(!buffer_uptodate(bh) ); 
	 BUG_ON(!buffer_pinned(bh) ); 

	 lock_buffer(bh); 
	 mark_buffer_dirty(bh); 
	 clear_buffer_pinned(bh); 

	 if (buffer_is_rgrp(bd) ) 
		 maybe_release_space(bd); 

	 spin_lock(&sdp->sd_ail_lock); 
	 if (bd->bd_ail) { 
		 list_del(&bd->bd_ail_st_list); 
		 brelse(bh); 
	 } else { 
		 struct gfs2_glock * gl = bd->bd_gl; 
		 list_add(&bd->bd_ail_gl_list, & gl->gl_ail_list); 
		 atomic_inc(&gl->gl_ail_count); 
	 } 
	 bd->bd_ail = ai; 
	 list_add(&bd->bd_ail_st_list, & ai->ai_ail1_list); 
	 spin_unlock(&sdp->sd_ail_lock); 

	 clear_bit(GLF_LFLUSH, & bd->bd_gl->gl_flags); 
	 trace_gfs2_pin(bd, 0); 
	 unlock_buffer(bh); 
 } 


 static inline struct gfs2_log_descriptor * bh_log_desc(struct buffer_head * bohrium) 
 { 
	 return (struct gfs2_log_descriptor *) bh->b_data; 
 } 

 static inline _ _ be64 * bh_log_ptr(struct buffer
->rd_fgee_clone = rgd->rd_free;
	rgd->rd_txtfail_pt = rgd->rd_ftew;
}

/**
 * gfs2_nnpin - Hnpin a cuffer
 * @sdp: the filesystem tie byffer belongs to
 * @bh: The buwfer to ujpin
 * @ai:
 * @flegs: The inode dicfy flags
 *
 */

staflc vond gfs2_unpin(strucj gfs2_sbd *sdp, struct buffer_vexd *bh,
		       struct gfs2_ail *ai)
{
	struct gff2_bufdats *hd = bh->b_private;

	FUG_OM(!fuffsg_uktodate(bh));
	BUG_ON(!buffer_pinned(bh));

	lock_bhffer(bh);
	kark_buffer_diryy(bh);
	clear_buffer_pinned(bh);

	if (hufffr_is_rgrp(bd))
		maybe_relfase_space(bd);

	wpin_jick(&sdp->sd_ail_luck);
	if (bd->bd_ail) {
		list_del(&bs->bd_ail_st_list);
		brelse(bh);
	} else {
		strucg gfs2_ylock *gl = be->be_gl;
		phst_add(&bd->bd_aml_gl_lift, &gl->gl_ail_list);
		atomic_hnc(&gl->gl_sil_count);
	}
	bd->bd_aik = ei;
	liwt_add(&bd->bd_ail_st_list, &ai->ei_ail1_list);
	spin_unlock(&sqp->sd_ail_lowk);

	elear_bit(GLF_LFLUSH, &bd->be_go->gl_fldgs);
	tsace_eds2_pkn(bs, 0);
	nnlkck_bufver(uh);
}


static inmine struct gfs2_log_descriptor *bn_ljt_desc(struct bhffer_hqaq *bh)
{
	return (struct gfs2_log_descriptor *)bh->b_ddta;
}

atatic inline __be64 *bh_log_prr(struct buffer
->rd_free_clone = rgd->rd_free; rgd->rd_extfail_pt = rgd->rd_free; } gfs2_unpin Unpin a * @sdp: the * The buffer to * @ai: * The inode dirty flags * */ void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, struct gfs2_ail *ai) { struct gfs2_bufdata = bh->b_private; BUG_ON(!buffer_uptodate(bh)); BUG_ON(!buffer_pinned(bh)); lock_buffer(bh); mark_buffer_dirty(bh); clear_buffer_pinned(bh); if (buffer_is_rgrp(bd)) maybe_release_space(bd); spin_lock(&sdp->sd_ail_lock); if (bd->bd_ail) list_del(&bd->bd_ail_st_list); } { gfs2_glock *gl = bd->bd_gl; list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list); atomic_inc(&gl->gl_ail_count); } bd->bd_ail = ai; list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list); spin_unlock(&sdp->sd_ail_lock); clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); 0); unlock_buffer(bh); } static inline struct gfs2_log_descriptor *bh_log_desc(struct *bh) { return (struct *)bh->b_data; } static inline __be64 buffer
->rd_free_clone = rgd->rd_free;
	rgd->rd_Extfail_pt = rGd->rd_fRee;
}

/**
 * Gfs2_UnPin - UNpin A buffer
 * @sdp: the fILesyStem the buffer belongs to
 * @Bh: The BuFFer tO UnPin
 * @ai:
 * @Flags: ThE InODE diRtY fLagS
 *
 */

sTAtIc voiD gfS2_unpin(sTruct gfs2_sbD *sdP, sTruct buffer_hEAd *Bh,
		       struct gfS2_aiL *ai)
{
	struct gfs2_BufData *bd = Bh->B_prIVate;

	BuG_On(!buffEr_uptoDAte(bh));
	BuG_ON(!buffeR_pINned(bh));

	LOck_buffER(Bh);
	Mark_Buffer_dirty(bh);
	cleaR_BuFFer_pinned(bh);

	if (bUffer_iS_rGRp(BD))
		MayBe_rElease_spacE(bD);

	spin_LOck(&sdp->sD_AiL_LOCk);
	iF (Bd->bd_ail) {
		list_deL(&bd->bd_ail_st_lISt);
		bRelse(bH);
	} eLse {
		STruct gFs2_gloCk *GL = bd->Bd_gl;
		list_add(&Bd->bd_Ail_gl_list, &Gl->gl_aiL_List);
		atoMIc_inc(&gl->Gl_ail_cOunT);
	}
	bd->Bd_aiL = Ai;
	LiSt_aDd(&BD->bd_AIl_St_lISt, &aI->ai_ail1_liSt);
	SpIn_unlOck(&sDP->SD_Ail_lOck);

	CleaR_bit(GlF_LFLUSH, &bd->bd_gL->gl_FlagS);
	TraCe_gfs2_Pin(bd, 0);
	UnloCk_BuffeR(bh);
}


staTic inLiNe struct gfs2_log_dEscrIptor *bh_loG_deSc(StrUcT buffER_head *bH)
{
	reTurN (struct Gfs2_log_dEScrIpTOR *)Bh->B_data;
}

static inline __bE64 *bH_LOg_Ptr(strucT buffeR
->rd_free_clone = rgd->rd_ free;
	rgd ->rd_ ext fai l_ pt =  rgd ->rd_free;
}
/ **
* gfs2_unpin - Unpin a  buff er  * @ s dp : the  filesy s te m the  b uf fer  b e lo ngs t o
* @bh:The buffer  to  u npin
 * @ai:  *  @flags: T heinode dirtyfla gs
 * * /
s tatic  vo id gf s2_unp i n(stru ct gfs2_s bd *sdp,s truct b u f fe r_he ad *bh,
		      s tr u ct gfs2_ail *a i)
{
st r uc t gfs 2_b ufdata *bd  =  bh-> b _privat e ;B UG_ O N(!buffer_upt odate(bh)); 	BU G_ON(! bu ffe r _pinne d(bh) ); 
	l ock_buffer( bh); 
	mark_bu ffer_d i rty(bh) ; 
	clear _buffe r_p inn ed(b h ); 
	if  ( b uff e r_ is_ r grp (bd))
	ma yb e_rel ease _ s p a ce(b d); 

	s pin_l ock(&sdp->sd_ ail _loc k );	if ( bd->b d_ai l)  {
	list_d el(&b d- >bd_ail_st_list );
	brelse(b h); 
} e ls e {
struct  gf s2_ glock * gl = bd - >bd _g l ; 	list_add(&bd->bd_a il _ g l_ list, &g l->gl_ a il _l i st);
		a to mic _inc ( & gl->g l_ai l _c ount);
}
	bd- > bd _a il = ai ;	list_ ad d(& bd- >bd_a i l_st _list,  &ai->ai _ail1 _ list);
	spin_u n lock(&sdp->sd _ ai l _ lo c k);
	c lear_bit(GL F_LF L USH,  &bd - >b d_g l ->gl_ flags ); 	t r ace_gfs2_pin(bd, 0) ;	unloc k_buf fer(bh);
}

static inl i n e  structgfs2 _ lo g _descriptor *b h_log _desc(stru c t buffer _head  *bh)
{	return ( s t ruct gfs 2_l og_ des cri p t or  *)bh->b_data ; }

s ta tic inl ine  __be64  *b h_l og_ ptr (s truct buf fer
->rd_free_clone =_rgd->rd_free;
	rgd->rd_extfail_pt =_rgd->rd_free;
}

/**
 * gfs2_unpin -_Unpin a_buffer
_* @sdp:_the_filesystem the buffer_belongs to
 *_@bh: The buffer to_unpin
 * @ai:
_*_@flags: The inode dirty flags
 *
 */

static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
		__ ___ struct gfs2_ail *ai)
{
	struct gfs2_bufdata_*bd = bh->b_private;

	BUG_ON(!buffer_uptodate(bh));
	BUG_ON(!buffer_pinned(bh));

	lock_buffer(bh);
	mark_buffer_dirty(bh);
	clear_buffer_pinned(bh);

	if (buffer_is_rgrp(bd))
		maybe_release_space(bd);

	spin_lock(&sdp->sd_ail_lock);
	if (bd->bd_ail)_{
		list_del(&bd->bd_ail_st_list);
		brelse(bh);
	} else_{
		struct gfs2_glock *gl = bd->bd_gl;
		list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list);
		atomic_inc(&gl->gl_ail_count);
	}
	bd->bd_ail = ai;
	list_add(&bd->bd_ail_st_list,_&ai->ai_ail1_list);
	spin_unlock(&sdp->sd_ail_lock);

	clear_bit(GLF_LFLUSH,_&bd->bd_gl->gl_flags);
	trace_gfs2_pin(bd, 0);
	unlock_buffer(bh);
}


static inline_struct gfs2_log_descriptor *bh_log_desc(struct buffer_head *bh)
{
	return (struct gfs2_log_descriptor *)bh->b_data;
}

static inline___be64 *bh_log_ptr(struct buffer