1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#include <linux/fs.h>
20#include <linux/namei.h>
21#include "jfs_incore.h"
22#include "jfs_inode.h"
23#include "jfs_xattr.h"
24
25static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
26{
27 char *s = JFS_IP(dentry->d_inode)->i_inline;
28 nd_set_link(nd, s);
29 return NULL;
30}
31
32const struct inode_operations jfs_fast_symlink_inode_operations = {
33 .readlink = generic_readlink,
34 .follow_link = jfs_follow_link,
35 .setattr = jfs_setattr,
36 .setxattr = jfs_setxattr,
37 .getxattr = jfs_getxattr,
38 .listxattr = jfs_listxattr,
39 .removexattr = jfs_removexattr,
40};
41
42const struct inode_operations jfs_symlink_inode_operations = {
43 .readlink = generic_readlink,
44 .follow_link = page_follow_link_light,
45 .put_link = page_put_link,
46 .setattr = jfs_setattr,
47 .setxattr = jfs_setxattr,
48 .getxattr = jfs_getxattr,
49 .listxattr = jfs_listxattr,
50 .removexattr = jfs_removexattr,
51};
52
53