import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / fs / sysv / symlink.c
1 /*
2  *  linux/fs/sysv/symlink.c
3  *
4  *  Handling of System V filesystem fast symlinks extensions.
5  *  Aug 2001, Christoph Hellwig (hch@infradead.org)
6  */
7
8 #include <linux/fs.h>
9
10 static int sysv_readlink(struct dentry *dentry, char *buffer, int buflen)
11 {
12         char *s = (char *)dentry->d_inode->u.sysv_i.i_data;
13         return vfs_readlink(dentry, buffer, buflen, s);
14 }
15
16 static int sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
17 {
18         char *s = (char *)dentry->d_inode->u.sysv_i.i_data;
19         return vfs_follow_link(nd, s);
20 }
21
22 struct inode_operations sysv_fast_symlink_inode_operations = {
23         readlink:       sysv_readlink,
24         follow_link:    sysv_follow_link,
25 };