projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff002b3
)
io_uring: allow AT_FDCWD for non-file openat/openat2/statx
author
Jens Axboe
<axboe@kernel.dk>
Fri, 7 Feb 2020 04:42:51 +0000
(21:42 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Sat, 8 Feb 2020 20:07:00 +0000
(13:07 -0700)
Don't just check for dirfd == -1, we should allow AT_FDCWD as well for
relative lookups.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index
2a7bb17
..
e6247b9
100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-4543,7
+4543,7
@@
static int io_req_needs_file(struct io_kiocb *req, int fd)
{
if (!io_op_defs[req->opcode].needs_file)
return 0;
- if (
fd == -1
&& io_op_defs[req->opcode].fd_non_neg)
+ if (
(fd == -1 || fd == AT_FDCWD)
&& io_op_defs[req->opcode].fd_non_neg)
return 0;
return 1;
}