Whamcloud - gitweb
- name switch: "light" --> "lite"
[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  *  Copyright (C) 1991, 1992  Linus Torvalds
13  *
14  *  ext2 symlink handling code
15  *
16  * Modified for OBDFS: 
17  *  Copyright (C) 1999 Seagate Technology Inc. (author: braam@stelias.com)
18  */
19
20 #include <linux/fs.h>
21 #include <linux/mm.h>
22 #include <linux/stat.h>
23 #include <linux/locks.h>
24
25 #define DEBUG_SUBSYSTEM S_LLITE
26
27 #include <linux/obd_support.h> /* for ENTRY and EXIT only */
28 #include <linux/lustre_lite.h>
29
30 static int ll_fast_readlink(struct dentry *dentry, char *buffer, int buflen)
31 {
32         char *s = ll_i2info(dentry->d_inode)->lli_inline;
33         return vfs_readlink(dentry, buffer, buflen, s);
34 }
35
36 static int ll_fast_follow_link(struct dentry *dentry, struct nameidata *nd)
37 {
38         char *s = ll_i2info(dentry->d_inode)->lli_inline;
39         return vfs_follow_link(nd, s); 
40 }
41
42 extern int ll_setattr(struct dentry *de, struct iattr *attr);
43 struct inode_operations ll_fast_symlink_inode_operations = {
44         readlink:       ll_fast_readlink,
45         follow_link:    ll_fast_follow_link,
46         setattr:        ll_setattr
47 };
48