projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0d45c3
)
io_uring/fs: consider link->flags when getting path for LINKAT
author
Charles Mirabile
<cmirabil@redhat.com>
Mon, 20 Nov 2023 10:55:45 +0000
(
05:55
-0500)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 20 Nov 2023 16:01:42 +0000
(09:01 -0700)
In order for `AT_EMPTY_PATH` to work as expected, the fact
that the user wants that behavior needs to make it to `getname_flags`
or it will return ENOENT.
Fixes: cf30da90bc3a ("io_uring: add support for IORING_OP_LINKAT")
Cc: <stable@vger.kernel.org>
Link:
https://github.com/axboe/liburing/issues/995
Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
Link:
https://lore.kernel.org/r/20231120105545.1209530-1-cmirabil@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/fs.c
patch
|
blob
|
history
diff --git
a/io_uring/fs.c
b/io_uring/fs.c
index 08e3b175469c685d64186595da74c778210df88a..eccea851dd5a2858936f8f0d9acc6c417614358a 100644
(file)
--- a/
io_uring/fs.c
+++ b/
io_uring/fs.c
@@
-254,7
+254,7
@@
int io_linkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
newf = u64_to_user_ptr(READ_ONCE(sqe->addr2));
lnk->flags = READ_ONCE(sqe->hardlink_flags);
- lnk->oldpath = getname
(oldf
);
+ lnk->oldpath = getname
_uflags(oldf, lnk->flags
);
if (IS_ERR(lnk->oldpath))
return PTR_ERR(lnk->oldpath);