Blame view
fs/ext4/symlink.c
1.32 KB
ac27a0ec1
|
1 |
/* |
617ba13b3
|
2 |
* linux/fs/ext4/symlink.c |
ac27a0ec1
|
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
* * Only fast symlinks left here - the rest is done by generic code. AV, 1999 * * Copyright (C) 1992, 1993, 1994, 1995 * Remy Card (card@masi.ibp.fr) * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) * * from * * linux/fs/minix/symlink.c * * Copyright (C) 1991, 1992 Linus Torvalds * |
617ba13b3
|
17 |
* ext4 symlink handling code |
ac27a0ec1
|
18 19 20 |
*/ #include <linux/fs.h> |
dab291af8
|
21 |
#include <linux/jbd2.h> |
617ba13b3
|
22 |
#include <linux/ext4_fs.h> |
ac27a0ec1
|
23 24 |
#include <linux/namei.h> #include "xattr.h" |
617ba13b3
|
25 |
static void * ext4_follow_link(struct dentry *dentry, struct nameidata *nd) |
ac27a0ec1
|
26 |
{ |
617ba13b3
|
27 |
struct ext4_inode_info *ei = EXT4_I(dentry->d_inode); |
ac27a0ec1
|
28 29 30 |
nd_set_link(nd, (char*)ei->i_data); return NULL; } |
754661f14
|
31 |
const struct inode_operations ext4_symlink_inode_operations = { |
ac27a0ec1
|
32 33 34 |
.readlink = generic_readlink, .follow_link = page_follow_link_light, .put_link = page_put_link, |
617ba13b3
|
35 |
#ifdef CONFIG_EXT4DEV_FS_XATTR |
ac27a0ec1
|
36 37 |
.setxattr = generic_setxattr, .getxattr = generic_getxattr, |
617ba13b3
|
38 |
.listxattr = ext4_listxattr, |
ac27a0ec1
|
39 40 41 |
.removexattr = generic_removexattr, #endif }; |
754661f14
|
42 |
const struct inode_operations ext4_fast_symlink_inode_operations = { |
ac27a0ec1
|
43 |
.readlink = generic_readlink, |
617ba13b3
|
44 45 |
.follow_link = ext4_follow_link, #ifdef CONFIG_EXT4DEV_FS_XATTR |
ac27a0ec1
|
46 47 |
.setxattr = generic_setxattr, .getxattr = generic_getxattr, |
617ba13b3
|
48 |
.listxattr = ext4_listxattr, |
ac27a0ec1
|
49 50 51 |
.removexattr = generic_removexattr, #endif }; |