File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -977,6 +977,14 @@ int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
977
977
msg .msg_controllen = 0 ;
978
978
msg .msg_namelen = 0 ;
979
979
980
+ if (zc -> addr ) {
981
+ ret = move_addr_to_kernel (zc -> addr , zc -> addr_len , & address );
982
+ if (unlikely (ret < 0 ))
983
+ return ret ;
984
+ msg .msg_name = (struct sockaddr * )& address ;
985
+ msg .msg_namelen = zc -> addr_len ;
986
+ }
987
+
980
988
if (zc -> flags & IORING_RECVSEND_FIXED_BUF ) {
981
989
ret = io_import_fixed (WRITE , & msg .msg_iter , req -> imu ,
982
990
(u64 )(uintptr_t )zc -> buf , zc -> len );
@@ -992,14 +1000,6 @@ int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
992
1000
return ret ;
993
1001
}
994
1002
995
- if (zc -> addr ) {
996
- ret = move_addr_to_kernel (zc -> addr , zc -> addr_len , & address );
997
- if (unlikely (ret < 0 ))
998
- return ret ;
999
- msg .msg_name = (struct sockaddr * )& address ;
1000
- msg .msg_namelen = zc -> addr_len ;
1001
- }
1002
-
1003
1003
msg_flags = zc -> msg_flags | MSG_ZEROCOPY ;
1004
1004
if (issue_flags & IO_URING_F_NONBLOCK )
1005
1005
msg_flags |= MSG_DONTWAIT ;
You can’t perform that action at this time.
0 commit comments