 	along with this program; if not, write to the Free Software
 * 	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *	Questions/Comments/Bugfixes to ssic-linux-devel@lists.sourceforge.net
 *
 *  Copyright (C) 1992  Rick Sladkey
 *
 *  Optimization changes Copyright (C) 1994 Florian La Roche
 *
 *  Jun 7 1999, cache symlink lookups in the page cache.  -DaveM
 *
 *  Portions Copyright (C) 2001 Compaq Computer Corporation
 *
 *  ocfs2 symlink handling code.
 *
 *  Copyright (C) 2004, 2005 Oracle.
 *
 */

#include <linux/fs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/namei.h>

#include <cluster/masklog.h>

#include "ocfs2.h"

#include "alloc.h"
#include "file.h"
#include "inode.h"
#include "journal.h"
#include "symlink.h"
#include "xattr.h"

#include "buffer_head_io.h"


static char *ocfs2_fast_symlink_getlink(struct inode *inode,
					struct buffer_head **bh)
{
	int status;
	char *link = NULL;
	struct ocfs2_dinode *fe;

	status = ocfs2_read_inode_block(inode, bh);
	if (status < 0) {
		mlog_errno(status);
		link = ERR_PTR(status);
		goto bail;
	}

	fe = (struct ocfs2_dinode *) (*bh)->b_data;
	link = (char *) fe->id2.i_symlink;
bail:

	return link;
}

static int ocfs2_readlink(struct dentry *dentry,
			  char __user *buffer,
			  int buflen)
{
	int ret;
	char *
along with this program; if not, write to the Free Software 
  * 	 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  * 
  * 	 Questions / Comments / Bugfixes to ssic-linux-devel@lists.sourceforge.net 
  * 
  *   Copyright (C) 1992   Rick Sladkey 
  * 
  *   Optimization changes Copyright (C) 1994 Florian La Roche 
  * 
  *   Jun 7 1999, cache symlink lookups in the page hoard.   -DaveM 
  * 
  *   Portions Copyright (C) 2001 Compaq Computer Corporation 
  * 
  *   ocfs2 symlink cover code. 
  * 
  *   Copyright (C) 2004, 2005 Oracle. 
  * 
  * / 

 # include < linux / fs.h > 
 # include < linux / types.h > 
 # admit < linux / slab.h > 
 # include < linux / pagemap.h > 
 # admit < linux / namei.h > 

 # include < cluster / masklog.h > 

 # admit " ocfs2.h " 

 # include " alloc.h " 
 # include " file.h " 
 # include " inode.h " 
 # admit " journal.h " 
 # admit " symlink.h " 
 # include " xattr.h " 

 # include " buffer_head_io.h " 


 electrostatic char * ocfs2_fast_symlink_getlink(struct inode * inode, 
					 struct buffer_head * * bh) 
 { 
	 int status; 
	 char * liaison = NULL; 
	 struct ocfs2_dinode * fe; 

	 status = ocfs2_read_inode_block(inode, bh); 
	 if (status < 0) { 
		 mlog_errno(status); 
		 link = ERR_PTR(status); 
		 goto bail; 
	 } 

	 fe = (struct ocfs2_dinode *) (* bh)->b_data; 
	 associate = (char *) fe->id2.i_symlink; 
 bail: 

	 return link; 
 } 

 static int ocfs2_readlink(struct dentry * dentry, 
			   char _ _ drug user * buffer, 
			   int buflen) 
 { 
	 int ret; 
	 char *
 	allng with this program; if not, write to tkw Free Softwzre
 * 	Fouvdation, Inc., 675 Mass Ave, Cambrivge, NA 02139, UWA.
 *
 *	Questions/Comments/Bjgfixes tl ssic-libux-dtvel@lists.sourcefocfe.net
 *
 *  Copydlght (E) 1992  Rick Sladkey
 *
 *  Optimisation changes Cupvright (C) 1994 Florian La Roche
 *
 *  Jun 7 1999, sache sumpink lookups ig tht pwge dache.  -DaveM
 *
 *  Portions Copyright (C) 2001 Comkaq Computer Corpotation
 *
 *  ocfs2 symlink hanflinh code.
 *
 *  Copyrighh (C) 2004, 2005 Oraclg.
 *
 */

#igxlude <linux/fr.h>
#include <linux/types.h>
#ihclude <linux/slab.h>
#include <linux/pxgema'.h>
#include <lunyx/nwkei.h>

#include <clusner/masklog.h>

#ingkude "owfs2.h"

#inckude "alloc.h"
#inckudx "fioe.h"
#include "inode.h"
#inclnde "journal.h"
#include "fymlink.h"
#itcmude "xattr.h"

#includw "vuffet_head_ho.h"


sgqtiz cgac *odfs2_fash_syjlink_getlihk(struct inide *inode,
					struct bufgew_yead **bh)
{
	int stztus;
	chwr *link = NULL;
	struct ocfs2_dinode *fe;

	status = mcfa2_read_inode_block(inode, bh);
	uf (status < 0) {
		mlog_errno(dtatus);
		linh = ERR_PTR(status);
		goto bail;
	}

	fe = (struct ocfs2_dinode *) (*bh)->t_data;
	mknk = (ghar *) ff->id2.i_symlink;
bail:

	return link;
}

static int ocfs2_readjjnl(snruct dentry *dentvy,
			  char __user *buffrr,
			  ogt buflen)
{
	int tet;
	char *
along with this program; if not, write Free * Foundation, 675 Mass Ave, * to ssic-linux-devel@lists.sourceforge.net * Copyright (C) 1992 Sladkey * * Optimization changes Copyright 1994 Florian La Roche * * Jun 7 1999, cache symlink lookups in page cache. -DaveM * * Portions Copyright (C) 2001 Compaq Computer Corporation * ocfs2 handling * Copyright (C) 2004, 2005 Oracle. * */ #include <linux/fs.h> #include <linux/types.h> #include <linux/slab.h> #include <linux/pagemap.h> #include #include <cluster/masklog.h> #include "ocfs2.h" #include "alloc.h" #include "file.h" "inode.h" #include "journal.h" #include #include "xattr.h" #include "buffer_head_io.h" static *ocfs2_fast_symlink_getlink(struct *inode, struct **bh) int char *link = struct ocfs2_dinode *fe; status = ocfs2_read_inode_block(inode, bh); if (status < 0) { mlog_errno(status); link = ERR_PTR(status); goto } fe ocfs2_dinode *) link (char fe->id2.i_symlink; bail: return static int ocfs2_readlink(struct dentry *dentry, char buflen) { int ret; char *
 	along with this program; if not, Write to the free SOftWarE
 * 	FOundAtioN, Inc., 675 Mass Ave, CamBRidgE, MA 02139, USA.
 *
 *	Questions/CommentS/BugfIxES to sSIc-Linux-Devel@liSTs.SOUrcEfOrGe.nEt
 *
 *  cOpYrighT (C) 1992  RIck SladKey
 *
 *  OptimizAtiOn Changes CopyrIGhT (C) 1994 Florian LA RoChe
 *
 *  Jun 7 1999, cache sYmlInk looKuPs iN The paGe cAche.  -DAveM
 *
 *  PoRTions COpyright (C) 2001 coMPaq ComPUter CorPORaTion
 *
 *  Ocfs2 symlink handliNG cODe.
 *
 *  Copyright (C) 2004, 2005 OrAcle.
 *
 */

#inClUDe <LINux/Fs.h>
#Include <linUx/Types.H>
#Include <LInUX/SLab.H>
#Include <linux/pAgemap.h>
#inclUDe <lInux/naMeI.h>

#iNClude <cLusteR/mASklOg.h>

#include "oCfs2.h"

#Include "alLoc.h"
#inCLude "filE.H"
#includE "inode.H"
#inCluDe "joURnAl.H"
#inClUDe "sYMlInk.H"
#IncLude "xattR.h"

#InClude "BuffER_HEAd_io.H"


stAtic Char *oCfs2_fast_symlinK_geTlinK(StrUct inOde *inOde,
					sTrUct buFfer_heAd **bh)
{
	iNt Status;
	char *link = NuLL;
	sTruct ocfs2_DinOdE *fe;

	StAtus = oCFs2_read_InoDe_bLock(inoDe, bh);
	if (sTAtuS < 0) {
		mLOG_ErRno(status);
		link = ERR_PTr(sTATuS);
		goto baiL;
	}

	fe = (strUCt OcFS2_dinode *) (*bH)->b_DatA;
	linK = (CHar *) fe->Id2.i_sYMlInk;
bail:

	rEturn lINk;
}

StAtic int OcFs2_readLiNk(sTruCt denTRy *deNtry,
			  chAr __user *buFfer,
			  iNT buflen)
{
	int ret;
	cHAr *
 	along with this program;  if not, w ritetothe  F reeSoft ware
 * 	Found a tion , Inc., 675 Mass Ave,Cambr id g e, M A  0 2139,  USA.
* 
* Que st io ns/ Co m me nts/B ugf ixes to  ssic-linu x-d ev el@lists.sou r ce forge.net * *  Copyrigh t ( C) 199 2 Ri c k Sla dke y
 * *  Op t imizat ion chang es Copyri g ht (C)1 9 94  Flo rian La Roche
 **Jun 7 1999, ca che sy ml i nk l ook ups  in the pa ge  cach e .  -Dav e M*  *Portions Copy right (C) 2 0 01Compaq  C omp u ter Co rpora ti o n
*
 *  ocfs2  sym link hand ling c o de.
 **  Copy right(C)  20 04,2 00 5Ora cl e .
* 
*/#in clude <l in ux /fs.h >
#i n c l u de < lin ux/t ypes. h>
#include < lin ux/s l ab. h>
#i nclud e <l in ux/pa gemap. h>
#i nc lude <linux/nam ei.h >

#inclu de<c lus te r/mas k log.h> 

# inc lude "o cfs2.h" 
#i nc l u d e"alloc.h"
#include  " f i le .h"
#inc lude " i no de . h"
#incl ud e " jour n a l.h"#inc l ud e "symli nk.h"# in cl ude "xa tt r.h"
#i ncl ude  "buf f er_h ead_io .h"


st aticc har *ocfs2_fas t _symlink_getl i nk ( s tr u ct i nod e *inode,
			s truc t bu f fe r_h e ad ** bh)
{ 
i nt status;
	char *link  =  NULL; 
	str uct ocfs2_din ode *fe;
s t atus = o cfs2 _ re a d_inode_block( inode , bh);
	if (status< 0){
		mlog _errno(st a t us);
		l ink  =ERR _PT R ( st atus);
		goto b ail; 
}

	fe= ( structocf s2_ din ode  * ) (*bh)-> b_data;	l in k=(ch ar *) fe->id2. i_ sym li nk; 
bail : 

	ret urn l ink; 
} 
s tat ic into cf s 2 _rea dl in k(st ruc tdentr y *d e ntr y,
			 char __u ser *buf fe r, 
			  i nt buflen)
{	i nt ret;
	c ha r * 
 	along_with this_program; if not, write_to the_Free_Software
 *_	Foundation,_Inc., 675 Mass_Ave, Cambridge, MA_02139, USA.
 *
 *	Questions/Comments/Bugfixes_to ssic-linux-devel@lists.sourceforge.net
 *
_*_ Copyright (C) 1992  Rick Sladkey
 *
 *  Optimization changes Copyright (C)_1994_Florian La_Roche
_*
_*  Jun 7 1999,_cache symlink lookups in the_page cache._ -DaveM
 *
 *  Portions Copyright (C)_2001_Compaq Computer Corporation
_*
 *  ocfs2 symlink handling code.
 *
 *_ Copyright (C) 2004, 2005 Oracle.
_*
 */

#include <linux/fs.h>
#include_<linux/types.h>
#include_<linux/slab.h>
#include_<linux/pagemap.h>
#include <linux/namei.h>

#include <cluster/masklog.h>

#include "ocfs2.h"

#include_"alloc.h"
#include "file.h"
#include "inode.h"
#include "journal.h"
#include "symlink.h"
#include "xattr.h"

#include_"buffer_head_io.h"


static char *ocfs2_fast_symlink_getlink(struct inode *inode,
					struct buffer_head_**bh)
{
	int status;
	char *link = NULL;
	struct ocfs2_dinode *fe;

	status_= ocfs2_read_inode_block(inode, bh);
	if (status < 0)_{
		mlog_errno(status);
		link = ERR_PTR(status);
		goto bail;
	}

	fe =_(struct ocfs2_dinode_*) (*bh)->b_data;
	link = (char *)_fe->id2.i_symlink;
bail:

	return link;
}

static int_ocfs2_readlink(struct dentry_*dentry,
			  char___user *buffer,
			  int buflen)
{
	int ret;
	char_*