diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-20 22:26:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-03 15:21:15 -0500 |
commit | 60dd654e337f0e81c995e3e25a571460dc339dcd (patch) | |
tree | 6bf17d62a6f24df99d35ce76f310af38a97c3fb0 | |
parent | 7c2f909400a4b1067df11a038b11f8a75a64365d (diff) |
kill ll_symlink_generic()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/staging/lustre/lustre/llite/namei.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index aa76d52fb92b..974d2d0dcc5b 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c | |||
@@ -879,24 +879,6 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry, | |||
879 | return rc; | 879 | return rc; |
880 | } | 880 | } |
881 | 881 | ||
882 | static int ll_symlink_generic(struct inode *dir, struct qstr *name, | ||
883 | const char *tgt, struct dentry *dchild) | ||
884 | { | ||
885 | int err; | ||
886 | |||
887 | CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),target=%.*s\n", | ||
888 | name->len, name->name, dir->i_ino, dir->i_generation, | ||
889 | dir, 3000, tgt); | ||
890 | |||
891 | err = ll_new_node(dir, name, (char *)tgt, S_IFLNK | S_IRWXUGO, | ||
892 | 0, dchild, LUSTRE_OPC_SYMLINK); | ||
893 | |||
894 | if (!err) | ||
895 | ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_SYMLINK, 1); | ||
896 | |||
897 | return err; | ||
898 | } | ||
899 | |||
900 | static int ll_link_generic(struct inode *src, struct inode *dir, | 882 | static int ll_link_generic(struct inode *src, struct inode *dir, |
901 | struct qstr *name, struct dentry *dchild) | 883 | struct qstr *name, struct dentry *dchild) |
902 | { | 884 | { |
@@ -1195,7 +1177,19 @@ static int ll_rmdir(struct inode *dir, struct dentry *dentry) | |||
1195 | static int ll_symlink(struct inode *dir, struct dentry *dentry, | 1177 | static int ll_symlink(struct inode *dir, struct dentry *dentry, |
1196 | const char *oldname) | 1178 | const char *oldname) |
1197 | { | 1179 | { |
1198 | return ll_symlink_generic(dir, &dentry->d_name, oldname, dentry); | 1180 | int err; |
1181 | |||
1182 | CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),target=%.*s\n", | ||
1183 | dentry, dir->i_ino, dir->i_generation, | ||
1184 | dir, 3000, oldname); | ||
1185 | |||
1186 | err = ll_new_node(dir, &dentry->d_name, oldname, S_IFLNK | S_IRWXUGO, | ||
1187 | 0, dentry, LUSTRE_OPC_SYMLINK); | ||
1188 | |||
1189 | if (!err) | ||
1190 | ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_SYMLINK, 1); | ||
1191 | |||
1192 | return err; | ||
1199 | } | 1193 | } |
1200 | 1194 | ||
1201 | static int ll_link(struct dentry *old_dentry, struct inode *dir, | 1195 | static int ll_link(struct dentry *old_dentry, struct inode *dir, |