1ac27a0ecSDave Kleikamp /* 2617ba13bSMingming Cao * linux/fs/ext4/symlink.c 3ac27a0ecSDave Kleikamp * 4ac27a0ecSDave Kleikamp * Only fast symlinks left here - the rest is done by generic code. AV, 1999 5ac27a0ecSDave Kleikamp * 6ac27a0ecSDave Kleikamp * Copyright (C) 1992, 1993, 1994, 1995 7ac27a0ecSDave Kleikamp * Remy Card (card@masi.ibp.fr) 8ac27a0ecSDave Kleikamp * Laboratoire MASI - Institut Blaise Pascal 9ac27a0ecSDave Kleikamp * Universite Pierre et Marie Curie (Paris VI) 10ac27a0ecSDave Kleikamp * 11ac27a0ecSDave Kleikamp * from 12ac27a0ecSDave Kleikamp * 13ac27a0ecSDave Kleikamp * linux/fs/minix/symlink.c 14ac27a0ecSDave Kleikamp * 15ac27a0ecSDave Kleikamp * Copyright (C) 1991, 1992 Linus Torvalds 16ac27a0ecSDave Kleikamp * 17617ba13bSMingming Cao * ext4 symlink handling code 18ac27a0ecSDave Kleikamp */ 19ac27a0ecSDave Kleikamp 20ac27a0ecSDave Kleikamp #include <linux/fs.h> 21dab291afSMingming Cao #include <linux/jbd2.h> 22ac27a0ecSDave Kleikamp #include <linux/namei.h> 233dcf5451SChristoph Hellwig #include "ext4.h" 24ac27a0ecSDave Kleikamp #include "xattr.h" 25ac27a0ecSDave Kleikamp 26617ba13bSMingming Cao static void *ext4_follow_link(struct dentry *dentry, struct nameidata *nd) 27ac27a0ecSDave Kleikamp { 28617ba13bSMingming Cao struct ext4_inode_info *ei = EXT4_I(dentry->d_inode); 29ac27a0ecSDave Kleikamp nd_set_link(nd, (char *) ei->i_data); 30ac27a0ecSDave Kleikamp return NULL; 31ac27a0ecSDave Kleikamp } 32ac27a0ecSDave Kleikamp 33754661f1SArjan van de Ven const struct inode_operations ext4_symlink_inode_operations = { 34ac27a0ecSDave Kleikamp .readlink = generic_readlink, 35ac27a0ecSDave Kleikamp .follow_link = page_follow_link_light, 36ac27a0ecSDave Kleikamp .put_link = page_put_link, 37*256a4535SDmitry Monakhov .setattr = ext4_setattr, 3803010a33STheodore Ts'o #ifdef CONFIG_EXT4_FS_XATTR 39ac27a0ecSDave Kleikamp .setxattr = generic_setxattr, 40ac27a0ecSDave Kleikamp .getxattr = generic_getxattr, 41617ba13bSMingming Cao .listxattr = ext4_listxattr, 42ac27a0ecSDave Kleikamp .removexattr = generic_removexattr, 43ac27a0ecSDave Kleikamp #endif 44ac27a0ecSDave Kleikamp }; 45ac27a0ecSDave Kleikamp 46754661f1SArjan van de Ven const struct inode_operations ext4_fast_symlink_inode_operations = { 47ac27a0ecSDave Kleikamp .readlink = generic_readlink, 48617ba13bSMingming Cao .follow_link = ext4_follow_link, 49*256a4535SDmitry Monakhov .setattr = ext4_setattr, 5003010a33STheodore Ts'o #ifdef CONFIG_EXT4_FS_XATTR 51ac27a0ecSDave Kleikamp .setxattr = generic_setxattr, 52ac27a0ecSDave Kleikamp .getxattr = generic_getxattr, 53617ba13bSMingming Cao .listxattr = ext4_listxattr, 54ac27a0ecSDave Kleikamp .removexattr = generic_removexattr, 55ac27a0ecSDave Kleikamp #endif 56ac27a0ecSDave Kleikamp }; 57