linux/fs/ocfs2/symlink.c
<<
n van van o/spa.14n ospa. class="lxr_search">n van van van va typ Search14 n van o/spa.14van oinput typ nva4 odiv id/ /1o/a>ospa. class="comment">/* -*- mode: c; c-basic-offset: 8; -*-o/spa.14/ /2o/a>ospa. class="comment"> * vim: noexpa.dtab sw=8 ts=8 sts=0:o/spa.14/ /3o/a>ospa. class="comment"> *o/spa.14/ /4o/a>ospa. class="comment"> * linux/cluster/ssi/cfs/symlink.co/spa.14/ /5o/a>ospa. class="comment"> *o/spa.14/ /6o/a>ospa. class="comment"> * This program is free software; you ca. redistribute it a.d/oro/spa.14/ /7o/a>ospa. class="comment"> * modify it under the terms of the GNU General Public License aso/spa.14/ /8o/a>ospa. class="comment"> * published by the Free Software Founda v3.; either verson> 2 ofo/spa.14/ /9o/a>ospa. class="comment"> * the License, or (at your v3.) a.y later verson>.o/spa.14/ >a>ospa. class="comment"> *o/spa.14/ 11o/a>ospa. class="comment"> * This program is distributed in the hope that it will be useful,o/spa.14/ 12o/a>ospa. class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty ofo/spa.14/ 13o/a>ospa. class="comment"> * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLEo/spa.14/ 14o/a>ospa. class="comment"> * a/ 15o/a>ospa. class="comment"> * a/ 16o/a>ospa. class="comment"> *o/spa.14/ 17o/a>ospa. class="comment"> * You should have received a copy of the GNU General Public Licenseo/spa.14/ 18o/a>ospa. class="comment"> * along with this program; if not, write to the Free Softwareo/spa.14/ 19o/a>ospa. class="comment"> * Founda v3., Inc., 675 Mass Ave, Cambridge, MA 02139, USA.o/spa.14/ 2 >a>ospa. class="comment"> *o/spa.14/ 21o/a>ospa. class="comment"> * Ques v3.s/Comments/Bugfixes to ssic-linux-devel@lists.sourceforge.neto/spa.14/ 22o/a>ospa. class="comment"> *o/spa.14/ 23o/a>ospa. class="comment"> * Copyright (C) 1992 Rick Sladkeyo/spa.14/ 24o/a>ospa. class="comment"> *o/spa.14/ 25o/a>ospa. class="comment"> * O vmiza v3. changes Copyright (C) 1994 Floria. La Rocheo/spa.14/ 26o/a>ospa. class="comment"> *o/spa.14/ 27o/a>ospa. class="comment"> * Jun 7 1999, cache symlink lookups in the page cache. -DaveMo/spa.14/ 28o/a>ospa. class="comment"> *o/spa.14/ 29o/a>ospa. class="comment"> * Por v3.s Copyright (C) 2001 Compaq Computer Corpora v3.o/spa.14/ 3 >a>ospa. class="comment"> *o/spa.14/ 31o/a>ospa. class="comment"> * ocfs2 symlink handling code.o/spa.14/ 32o/a>ospa. class="comment"> *o/spa.14/ 33o/a>ospa. class="comment"> * Copyright (C) 2004, 2005 Oracle.o/spa.14/ 34o/a>ospa. class="comment"> *o/spa.14/ 35o/a>ospa. class="comment"> */o/spa.14/ 36o/a>4/ 37o/a>#include <linux/fs.ho/a>>4/ 38o/a>#include <linux/typ s.ho/a>>4/ 39o/a>#include <linux/slab.ho/a>>4/ 40o/a>#include <linux/pagemap.ho/a>>4/ 41o/a>#include <linux/nam i.ho/a>>4/ 42o/a>4/ 43o/a>#include <cluster/masklog.ho/a>>4/ 44o/a>4/ 45o/a>#include "ocfs2.ho/a>"4/ 46o/a>4/ 47o/a>#include "alloc.ho/a>"4/ 48o/a>#include "file.ho/a>"4/ 49o/a>#include "inode.ho/a>"4/ 50o/a>#include "journal.ho/a>"4/ 51o/a>#include "symlink.ho/a>"4/ 52o/a>#include "xattr.ho/a>"4/ 53o/a>4/ 54o/a>#include "buffer_head_io.ho/a>"4/ 55o/a>4/ 56o/a>4/ 57o/a>static int/oa href="+code=ocfs2_fast_symlink_readpage" class="sref">ocfs2_fast_symlink_readpageo/a>(struct/oa href="+code=file" class="sref">fileo/a> *oa href="+code=unused" class="sref">unusedo/a>, struct/oa href="+code=page" class="sref">pageo/a> *oa href="+code=page" class="sref">pageo/a>)4/ 58o/a>{4/ 59o/a> struct/oa href="+code=inode" class="sref">inodeo/a> *oa href="+code=inode" class="sref">inodeo/a> =/oa href="+code=page" class="sref">pageo/a>->oa href="+code=mapping" class="sref">mappingo/a>->oa href="+code=host" class="sref">hosto/a>;4/ 60o/a> struct/oa href="+code=buffer_head" class="sref">buffer_heado/a> *oa href="+code=bh" class="sref">bho/a>;4/ 61o/a> int/oa href="+code=status" class="sref">statuso/a> =/oa href="+code=ocfs2_read_inode_block" class="sref">ocfs2_read_inode_blocko/a>(oa href="+code=inode" class="sref">inodeo/a>, &oa href="+code=bh" class="sref">bho/a>);4/ 62o/a> struct/oa href="+code=ocfs2_dinode" class="sref">ocfs2_dinodeo/a> *oa href="+code=fe" class="sref">feo/a>;4/ 63o/a> const char *oa href="+code=link" class="sref">linko/a>;4/ 64o/a> void *oa href="+code=kaddr" class="sref">kaddro/a>;4/ 65o/a> oa href="+code=size_t" class="sref">size_to/a> oa href="+code=len" class="sref">leno/a>;4/ 66o/a>4/ 67o/a> if (oa href="+code=status" class="sref">statuso/a> < 0) {4/ 68o/a> oa href="+code=mlog_errno" class="sref">mlog_errnoo/a>(oa href="+code=status" class="sref">statuso/a>);4/ 69o/a> return oa href="+code=status" class="sref">statuso/a>;4/ 70o/a> }4/ 71o/a>4/ 72o/a> oa href="+code=fe" class="sref">feo/a> =/(struct/oa href="+code=ocfs2_dinode" class="sref">ocfs2_dinodeo/a> *)/oa href="+code=bh" class="sref">bho/a>->oa href="+code=b_data" class="sref">b_datao/a>;4/ 73o/a> oa href="+code=link" class="sref">linko/a> =/(char *)/oa href="+code=fe" class="sref">feo/a>->oa href="+code=id2" class="sref">id2o/a>.oa href="+code=i_symlink" class="sref">i_symlinko/a>;4/ 74o/a> ospa. class="comment">/* will be less than a page size */o/spa.14/ 75o/a> oa href="+code=len" class="sref">leno/a> =/oa href="+code=strnlen" class="sref">strnleno/a>(oa href="+code=link" class="sref">linko/a>,/oa href="+code=ocfs2_fast_symlink_chars" class="sref">ocfs2_fast_symlink_charso/a>(oa href="+code=inode" class="sref">inodeo/a>->oa href="+code=i_sb" class="sref">i_sbo/a>));4/ 76o/a> oa href="+code=kaddr" class="sref">kaddro/a> =/oa href="+code=kmap_atomic" class="sref">kmap_atomico/a>(oa href="+code=page" class="sref">pageo/a>);4/ 77o/a> oa href="+code=memcpy" class="sref">memcpyo/a>(oa href="+code=kaddr" class="sref">kaddro/a>,/oa href="+code=link" class="sref">linko/a>,/oa href="+code=len" class="sref">leno/a> + 1);4/ 78o/a> oa href="+code=kunmap_atomic" class="sref">kunmap_atomico/a>(oa href="+code=kaddr" class="sref">kaddro/a>);4/ 79o/a> oa href="+code=SetPageUptodate" class="sref">SetPageUptodateo/a>(oa href="+code=page" class="sref">pageo/a>);4/ 80o/a> oa href="+code=unlock_page" class="sref">unlock_pageo/a>(oa href="+code=page" class="sref">pageo/a>);4/ 81o/a> oa href="+code=brelse" class="sref">brelseo/a>(oa href="+code=bh" class="sref">bho/a>);4/ 82o/a> return 0;4/ 83o/a>}4/ 84o/a>4/ 85o/a>const struct/oa href="+code=address_space_opera v3.s" class="sref">address_space_opera v3.so/a> oa href="+code=ocfs2_fast_symlink_aops" class="sref">ocfs2_fast_symlink_aopso/a> =/{4/ 86o/a> .oa href="+code=readpage" class="sref">readpageo/a> =/oa href="+code=ocfs2_fast_symlink_readpage" class="sref">ocfs2_fast_symlink_readpageo/a>,4/ 87o/a>};4/ 88o/a>4/ 89o/a>const struct/oa href="+code=inode_opera v3.s" class="sref">inode_opera v3.so/a> oa href="+code=ocfs2_symlink_inode_opera v3.s" class="sref">ocfs2_symlink_inode_opera v3.so/a> =/{4/ 90o/a> .oa href="+code=readlink" class="sref">readlinko/a> =/oa href="+code=generic_readlink" class="sref">generic_readlinko/a>,4/ 91o/a> .oa href="+code=follow_link" class="sref">follow_linko/a> =/oa href="+code=page_follow_link_light" class="sref">page_follow_link_lighto/a>,4/ 92o/a> .oa href="+code=put_link" class="sref">put_linko/a> =/oa href="+code=page_put_link" class="sref">page_put_linko/a>,4/ 93o/a> .oa href="+code=getattr" class="sref">getattro/a> =/oa href="+code=ocfs2_getattr" class="sref">ocfs2_getattro/a>,4/ 94o/a> .oa href="+code=setattr" class="sref">setattro/a> =/oa href="+code=ocfs2_setattr" class="sref">ocfs2_setattro/a>,4/ 95o/a> .oa href="+code=setxattr" class="sref">setxattro/a> =/oa href="+code=generic_setxattr" class="sref">generic_setxattro/a>,4/ 96o/a> .oa href="+code=getxattr" class="sref">getxattro/a> =/oa href="+code=generic_getxattr" class="sref">generic_getxattro/a>,4/ 97o/a> .oa href="+code=listxattr" class="sref">listxattro/a> =/oa href="+code=ocfs2_listxattr" class="sref">ocfs2_listxattro/a>,4/ 98o/a> .oa href="+code=removexattr" class="sref">removexattro/a> =/oa href="+code=generic_removexattr" class="sref">generic_removexattro/a>,4/ 99o/a> .oa href="+code=fiemap" class="sref">fiemapo/a> =/oa href="+code=ocfs2_fiemap" class="sref">ocfs2_fiemapo/a>,4/100o/a>};4/101o/a>o/pre> The original LXR software by the LXR communityo/a>,/this experimental verson> by lxr@linux.noo/a>. o/div14odiv class="subfooter"> lxr.linux.no kindly hosted by Redpill Linpro ASo/a>,/provider of Linux consulting and opera v3.s services since 1995. o/div14 o/body14o/html14