summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2026-01-13 15:02:36 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2026-01-13 15:02:36 -0500
commit8714a249da48cb6758a7980b1edc53ffc9024251 (patch)
tree25322d358cac1674d1483f6ffca90fc582234e90
parentb0f27ace0812bf7551fa16acff9b4670c65190b8 (diff)
init_symlink(): turn into a trivial wrapper for do_symlinkat()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/init.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/init.c b/fs/init.c
index 4b1fd7675095..27e149a4e8ce 100644
--- a/fs/init.c
+++ b/fs/init.c
@@ -180,19 +180,8 @@ out:
int __init init_symlink(const char *oldname, const char *newname)
{
- struct dentry *dentry;
- struct path path;
- int error;
-
- dentry = start_creating_path(AT_FDCWD, newname, &path, 0);
- if (IS_ERR(dentry))
- return PTR_ERR(dentry);
- error = security_path_symlink(&path, dentry, oldname);
- if (!error)
- error = vfs_symlink(mnt_idmap(path.mnt), path.dentry->d_inode,
- dentry, oldname, NULL);
- end_creating_path(&path, dentry);
- return error;
+ return do_symlinkat(getname_kernel(oldname), AT_FDCWD,
+ getname_kernel(newname));
}
int __init init_unlink(const char *pathname)