diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-02 10:37:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-10 22:18:26 -0400 |
commit | 2e03f3ea7acbee59a89ea73a696b2eb4c3145cde (patch) | |
tree | 0d9a2ad8183ff73678ee231ab93730ebff048324 | |
parent | 0f301bd3055e86771e7c738ca009afad0964dbd2 (diff) |
sysv: switch to simple_follow_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/sysv/Makefile | 2 | ||||
-rw-r--r-- | fs/sysv/inode.c | 5 | ||||
-rw-r--r-- | fs/sysv/symlink.c | 20 | ||||
-rw-r--r-- | fs/sysv/sysv.h | 1 |
4 files changed, 4 insertions, 24 deletions
diff --git a/fs/sysv/Makefile b/fs/sysv/Makefile index 3591f9d7a48a..7a75e70a4b61 100644 --- a/fs/sysv/Makefile +++ b/fs/sysv/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | obj-$(CONFIG_SYSV_FS) += sysv.o | 5 | obj-$(CONFIG_SYSV_FS) += sysv.o |
6 | 6 | ||
7 | sysv-objs := ialloc.o balloc.o inode.o itree.o file.o dir.o \ | 7 | sysv-objs := ialloc.o balloc.o inode.o itree.o file.o dir.o \ |
8 | namei.o super.o symlink.o | 8 | namei.o super.o |
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 88956309cc86..590ad9206e3f 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -166,8 +166,9 @@ void sysv_set_inode(struct inode *inode, dev_t rdev) | |||
166 | inode->i_op = &sysv_symlink_inode_operations; | 166 | inode->i_op = &sysv_symlink_inode_operations; |
167 | inode->i_mapping->a_ops = &sysv_aops; | 167 | inode->i_mapping->a_ops = &sysv_aops; |
168 | } else { | 168 | } else { |
169 | inode->i_op = &sysv_fast_symlink_inode_operations; | 169 | inode->i_op = &simple_symlink_inode_operations; |
170 | nd_terminate_link(SYSV_I(inode)->i_data, inode->i_size, | 170 | inode->i_link = (char *)SYSV_I(inode)->i_data; |
171 | nd_terminate_link(inode->i_link, inode->i_size, | ||
171 | sizeof(SYSV_I(inode)->i_data) - 1); | 172 | sizeof(SYSV_I(inode)->i_data) - 1); |
172 | } | 173 | } |
173 | } else | 174 | } else |
diff --git a/fs/sysv/symlink.c b/fs/sysv/symlink.c deleted file mode 100644 index d3fa0d703314..000000000000 --- a/fs/sysv/symlink.c +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * linux/fs/sysv/symlink.c | ||
3 | * | ||
4 | * Handling of System V filesystem fast symlinks extensions. | ||
5 | * Aug 2001, Christoph Hellwig (hch@infradead.org) | ||
6 | */ | ||
7 | |||
8 | #include "sysv.h" | ||
9 | #include <linux/namei.h> | ||
10 | |||
11 | static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd) | ||
12 | { | ||
13 | nd_set_link(nd, (char *)SYSV_I(d_inode(dentry))->i_data); | ||
14 | return NULL; | ||
15 | } | ||
16 | |||
17 | const struct inode_operations sysv_fast_symlink_inode_operations = { | ||
18 | .readlink = generic_readlink, | ||
19 | .follow_link = sysv_follow_link, | ||
20 | }; | ||
diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h index 69d488986cce..2c13525131cd 100644 --- a/fs/sysv/sysv.h +++ b/fs/sysv/sysv.h | |||
@@ -161,7 +161,6 @@ extern ino_t sysv_inode_by_name(struct dentry *); | |||
161 | 161 | ||
162 | extern const struct inode_operations sysv_file_inode_operations; | 162 | extern const struct inode_operations sysv_file_inode_operations; |
163 | extern const struct inode_operations sysv_dir_inode_operations; | 163 | extern const struct inode_operations sysv_dir_inode_operations; |
164 | extern const struct inode_operations sysv_fast_symlink_inode_operations; | ||
165 | extern const struct file_operations sysv_file_operations; | 164 | extern const struct file_operations sysv_file_operations; |
166 | extern const struct file_operations sysv_dir_operations; | 165 | extern const struct file_operations sysv_dir_operations; |
167 | extern const struct address_space_operations sysv_aops; | 166 | extern const struct address_space_operations sysv_aops; |