提交 0158137d 编写于 作者: L Linus Torvalds

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
...@@ -165,7 +165,8 @@ int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags) ...@@ -165,7 +165,8 @@ int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags)
req_set_fail(req); req_set_fail(req);
io_req_set_res(req, ret, 0); io_req_set_res(req, ret, 0);
/* put file to avoid an attempt to IOPOLL the req */ /* put file to avoid an attempt to IOPOLL the req */
io_put_file(req->file); if (!(req->flags & REQ_F_FIXED_FILE))
io_put_file(req->file);
req->file = NULL; req->file = NULL;
return IOU_OK; return IOU_OK;
} }
...@@ -206,7 +206,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res) ...@@ -206,7 +206,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
return false; return false;
} }
static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res) static inline int io_fixup_rw_res(struct io_kiocb *req, long res)
{ {
struct io_async_rw *io = req->async_data; struct io_async_rw *io = req->async_data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册