Skip to content

Commit 5b3974d

Browse files
committed
Merge branch 'for-6.11/io_uring' into for-next
* for-6.11/io_uring: io_uring/net: cleanup io_recv_finish() bundle handling
2 parents 62ab59f + 93d8032 commit 5b3974d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

io_uring/net.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -827,20 +827,20 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
827827
bool mshot_finished, unsigned issue_flags)
828828
{
829829
struct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);
830-
unsigned int cflags;
831-
832-
if (sr->flags & IORING_RECVSEND_BUNDLE)
833-
cflags = io_put_kbufs(req, io_bundle_nbufs(kmsg, *ret),
834-
issue_flags);
835-
else
836-
cflags = io_put_kbuf(req, issue_flags);
830+
unsigned int cflags = 0;
837831

838832
if (kmsg->msg.msg_inq > 0)
839833
cflags |= IORING_CQE_F_SOCK_NONEMPTY;
840834

841-
/* bundle with no more immediate buffers, we're done */
842-
if (sr->flags & IORING_RECVSEND_BUNDLE && req->flags & REQ_F_BL_EMPTY)
843-
goto finish;
835+
if (sr->flags & IORING_RECVSEND_BUNDLE) {
836+
cflags |= io_put_kbufs(req, io_bundle_nbufs(kmsg, *ret),
837+
issue_flags);
838+
/* bundle with no more immediate buffers, we're done */
839+
if (req->flags & REQ_F_BL_EMPTY)
840+
goto finish;
841+
} else {
842+
cflags |= io_put_kbuf(req, issue_flags);
843+
}
844844

845845
/*
846846
* Fill CQE for this receive and see if we should keep trying to

0 commit comments

Comments
 (0)