Skip to content

Commit 0158137

Browse files
committed
Merge tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe: "Two small patches: - Fix using an unsigned type for the return value, introduced in this release (Pavel) - Stable fix for a missing check for a fixed file on put (me)" * tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block: io_uring/msg_ring: check file type before putting io_uring/rw: fix error'ed retry return values
2 parents 5763d7f + fc7222c commit 0158137

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

io_uring/msg_ring.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags)
165165
req_set_fail(req);
166166
io_req_set_res(req, ret, 0);
167167
/* put file to avoid an attempt to IOPOLL the req */
168-
io_put_file(req->file);
168+
if (!(req->flags & REQ_F_FIXED_FILE))
169+
io_put_file(req->file);
169170
req->file = NULL;
170171
return IOU_OK;
171172
}

io_uring/rw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
206206
return false;
207207
}
208208

209-
static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res)
209+
static inline int io_fixup_rw_res(struct io_kiocb *req, long res)
210210
{
211211
struct io_async_rw *io = req->async_data;
212212

0 commit comments

Comments
 (0)