summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-05-26 16:58:18 -0600
committerJens Axboe <axboe@kernel.dk>2022-05-31 02:50:06 -0600
commitfa82dd105bed389f37d919fd783ce459bb92facb (patch)
treeb484e4829c4cdbc0295b94b51fa95c802a0ca86c
parent21870e02fcd385c39fe635e6531ce78302f3cd71 (diff)
downloadlinux-stable-fa82dd105bed389f37d919fd783ce459bb92facb.tar.gz
linux-stable-fa82dd105bed389f37d919fd783ce459bb92facb.tar.bz2
linux-stable-fa82dd105bed389f37d919fd783ce459bb92facb.zip
io_uring: wire up allocated direct descriptors for socket
The socket support was merged in an earlier branch that didn't yet have support for allocating direct descriptors, hence only open and accept got support for that. Do the one-liner to enable it now, so we have consistent support for any request that can instantiate a file/direct descriptor. Reviewed-by: Hao Xu <howeyxu@tencent.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index f14ebe4bb65d..53683fa36a36 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6676,8 +6676,8 @@ static int io_socket(struct io_kiocb *req, unsigned int issue_flags)
fd_install(fd, file);
ret = fd;
} else {
- ret = io_install_fixed_file(req, file, issue_flags,
- sock->file_slot - 1);
+ ret = io_fixed_fd_install(req, issue_flags, file,
+ sock->file_slot);
}
__io_req_complete(req, issue_flags, ret, 0);
return 0;