aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/jfs/inode.c2
-rw-r--r--fs/jfs/jfs_inode.h1
-rw-r--r--fs/jfs/namei.c4
-rw-r--r--fs/jfs/symlink.c14
4 files changed, 17 insertions, 4 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index b2ae190a77b..97cd11954d0 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -60,7 +60,7 @@ struct inode *jfs_iget(struct super_block *sb, unsigned long ino)
60 inode->i_op = &page_symlink_inode_operations; 60 inode->i_op = &page_symlink_inode_operations;
61 inode->i_mapping->a_ops = &jfs_aops; 61 inode->i_mapping->a_ops = &jfs_aops;
62 } else { 62 } else {
63 inode->i_op = &jfs_symlink_inode_operations; 63 inode->i_op = &jfs_fast_symlink_inode_operations;
64 /* 64 /*
65 * The inline data should be null-terminated, but 65 * The inline data should be null-terminated, but
66 * don't let on-disk corruption crash the kernel 66 * don't let on-disk corruption crash the kernel
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h
index 1eff7db34d6..f8b56b238bb 100644
--- a/fs/jfs/jfs_inode.h
+++ b/fs/jfs/jfs_inode.h
@@ -47,5 +47,6 @@ extern const struct file_operations jfs_dir_operations;
47extern const struct inode_operations jfs_file_inode_operations; 47extern const struct inode_operations jfs_file_inode_operations;
48extern const struct file_operations jfs_file_operations; 48extern const struct file_operations jfs_file_operations;
49extern const struct inode_operations jfs_symlink_inode_operations; 49extern const struct inode_operations jfs_symlink_inode_operations;
50extern const struct inode_operations jfs_fast_symlink_inode_operations;
50extern const struct dentry_operations jfs_ci_dentry_operations; 51extern const struct dentry_operations jfs_ci_dentry_operations;
51#endif /* _H_JFS_INODE */ 52#endif /* _H_JFS_INODE */
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index c79a4270f08..114e6007110 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -946,7 +946,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
946 */ 946 */
947 947
948 if (ssize <= IDATASIZE) { 948 if (ssize <= IDATASIZE) {
949 ip->i_op = &jfs_symlink_inode_operations; 949 ip->i_op = &jfs_fast_symlink_inode_operations;
950 950
951 i_fastsymlink = JFS_IP(ip)->i_inline; 951 i_fastsymlink = JFS_IP(ip)->i_inline;
952 memcpy(i_fastsymlink, name, ssize); 952 memcpy(i_fastsymlink, name, ssize);
@@ -968,7 +968,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
968 else { 968 else {
969 jfs_info("jfs_symlink: allocate extent ip:0x%p", ip); 969 jfs_info("jfs_symlink: allocate extent ip:0x%p", ip);
970 970
971 ip->i_op = &page_symlink_inode_operations; 971 ip->i_op = &jfs_symlink_inode_operations;
972 ip->i_mapping->a_ops = &jfs_aops; 972 ip->i_mapping->a_ops = &jfs_aops;
973 973
974 /* 974 /*
diff --git a/fs/jfs/symlink.c b/fs/jfs/symlink.c
index 4af1a05aad0..205b946d8e0 100644
--- a/fs/jfs/symlink.c
+++ b/fs/jfs/symlink.c
@@ -29,9 +29,21 @@ static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
29 return NULL; 29 return NULL;
30} 30}
31 31
32const struct inode_operations jfs_symlink_inode_operations = { 32const struct inode_operations jfs_fast_symlink_inode_operations = {
33 .readlink = generic_readlink, 33 .readlink = generic_readlink,
34 .follow_link = jfs_follow_link, 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,
35 .setxattr = jfs_setxattr, 47 .setxattr = jfs_setxattr,
36 .getxattr = jfs_getxattr, 48 .getxattr = jfs_getxattr,
37 .listxattr = jfs_listxattr, 49 .listxattr = jfs_listxattr,