diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2026-01-07 07:19:10 +0300 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2026-01-16 20:46:57 +0300 |
| commit | e6d50234ccb9ff54addd579032a146aef52e7541 (patch) | |
| tree | 6d246b580fe389896d4957db44c0ba4dc02b7b49 /io_uring | |
| parent | 0697b4f400696c1311cbd14421698b340dd8f7d4 (diff) | |
| download | linux-e6d50234ccb9ff54addd579032a146aef52e7541.tar.xz | |
non-consuming variant of do_renameat2()
filename_renameat2() replaces do_renameat2(); unlike the latter,
it does not drop filename references - these days it can be just
as easily arranged in the caller.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'io_uring')
| -rw-r--r-- | io_uring/fs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/io_uring/fs.c b/io_uring/fs.c index c04c6282210a..e5829d112c9e 100644 --- a/io_uring/fs.c +++ b/io_uring/fs.c @@ -82,13 +82,14 @@ int io_renameat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) int io_renameat(struct io_kiocb *req, unsigned int issue_flags) { struct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename); + CLASS(filename_complete_delayed, old)(&ren->oldpath); + CLASS(filename_complete_delayed, new)(&ren->newpath); int ret; WARN_ON_ONCE(issue_flags & IO_URING_F_NONBLOCK); - ret = do_renameat2(ren->old_dfd, complete_getname(&ren->oldpath), - ren->new_dfd, complete_getname(&ren->newpath), - ren->flags); + ret = filename_renameat2(ren->old_dfd, old, + ren->new_dfd, new, ren->flags); req->flags &= ~REQ_F_NEED_CLEANUP; io_req_set_res(req, ret, 0); |
