Whamcloud - gitweb
72c68f4a68f7128df1c6978a37b8340c08dd23ca
[fs/lustre-release.git] / lustre / smfs / symlink.c
1 /*
2  *  smfs/symlink.c
3  *
4  *
5  */
6 #define DEBUG_SUBSYSTEM S_SNAP
7
8 #include <linux/kmod.h>
9 #include <linux/init.h>
10 #include <linux/fs.h>
11 #include <linux/slab.h>
12 #include <linux/string.h>
13
14 #include "smfs_internal.h" 
15
16 static int smfs_readlink(struct dentry * dentry, char * buffer, int buflen)
17 {
18         struct inode *cache_inode = I2CI(dentry->d_inode);
19         int rc = 0;
20
21         if (cache_inode->i_op && cache_inode->i_op->readlink)   
22                 rc = cache_inode->i_op->readlink(dentry, buffer, buflen);
23         
24         return rc;
25 }
26
27 static int smfs_follow_link(struct dentry *dentry, struct nameidata *nd)
28 {
29         struct inode *cache_inode = I2CI(dentry->d_inode);
30         int rc = 0;
31
32         if (cache_inode->i_op && cache_inode->i_op->follow_link)        
33                 rc = cache_inode->i_op->follow_link(dentry, nd);
34         
35         return rc;
36
37 }
38 struct inode_operations smfs_sym_iops = {
39         readlink:       smfs_readlink,
40         follow_link:    smfs_follow_link,
41 };
42
43 struct file_operations smfs_sym_fops = {
44 };