Whamcloud - gitweb
- Added DEBUG_SUBSYSTEMs
[fs/lustre-release.git] / lustre / llite / symlink.c
1 /*
2  *  linux/fs/ext2/symlink.c
3  *
4  * This code is issued under the GNU General Public License.
5  * See the file COPYING in this distribution
6  *
7  * Copyright (C) 1992, 1993, 1994, 1995
8  * Remy Card (card@masi.ibp.fr)
9  * Laboratoire MASI - Institut Blaise Pascal
10  * Universite Pierre et Marie Curie (Paris VI)
11  *
12  *  from
13  *
14  *  linux/fs/minix/symlink.c
15  *
16  *  Copyright (C) 1991, 1992  Linus Torvalds
17  *
18  *  ext2 symlink handling code
19  *
20  * Modified for OBDFS: 
21  *  Copyright (C) 1999 Seagate Technology Inc. (author: braam@stelias.com)
22  */
23
24 #include <linux/fs.h>
25 #include <linux/mm.h>
26 #include <linux/stat.h>
27 #include <linux/locks.h>
28
29 #define DEBUG_SUBSYSTEM S_LLIGHT
30
31 #include <linux/obd_support.h> /* for ENTRY and EXIT only */
32 #include <linux/lustre_light.h>
33
34 static int ll_fast_readlink(struct dentry *dentry, char *buffer, int buflen)
35 {
36         char *s = ll_i2info(dentry->d_inode)->lli_inline;
37         return vfs_readlink(dentry, buffer, buflen, s);
38 }
39
40 static int ll_fast_follow_link(struct dentry *dentry, struct nameidata *nd)
41 {
42         char *s = ll_i2info(dentry->d_inode)->lli_inline;
43         return vfs_follow_link(nd, s); 
44 }
45
46 extern int ll_setattr(struct dentry *de, struct iattr *attr);
47 struct inode_operations ll_fast_symlink_inode_operations = {
48         readlink:       ll_fast_readlink,
49         follow_link:    ll_fast_follow_link,
50         setattr:        ll_setattr
51 };
52