non-consuming variant of do_symlinkat()

similar to previous commit; replacement is filename_symlinkat()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2026-01-06 23:26:43 -05:00
parent 037193b0ae
commit da72b76aae
5 changed files with 20 additions and 18 deletions

View File

@@ -233,12 +233,13 @@ int io_symlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
int io_symlinkat(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_link *sl = io_kiocb_to_cmd(req, struct io_link);
CLASS(filename_complete_delayed, old)(&sl->oldpath);
CLASS(filename_complete_delayed, new)(&sl->newpath);
int ret;
WARN_ON_ONCE(issue_flags & IO_URING_F_NONBLOCK);
ret = do_symlinkat(complete_getname(&sl->oldpath), sl->new_dfd,
complete_getname(&sl->newpath));
ret = filename_symlinkat(old, sl->new_dfd, new);
req->flags &= ~REQ_F_NEED_CLEANUP;
io_req_set_res(req, ret, 0);