Loading fs/io_uring.c +19 −15 Original line number Diff line number Diff line Loading @@ -1705,18 +1705,13 @@ static inline void io_put_file(struct io_kiocb *req, struct file *file, static void io_dismantle_req(struct io_kiocb *req) { if (req->flags & (REQ_F_NEED_CLEANUP | REQ_F_BUFFER_SELECTED)) io_clean_op(req); if (req->async_data) kfree(req->async_data); unsigned int flags = req->flags; if (req->file) io_put_file(req, req->file, (req->flags & REQ_F_FIXED_FILE)); if (req->fixed_rsrc_refs) percpu_ref_put(req->fixed_rsrc_refs); if (req->work.creds) { put_cred(req->work.creds); req->work.creds = NULL; } io_put_file(req, req->file, (flags & REQ_F_FIXED_FILE)); if (flags & (REQ_F_NEED_CLEANUP | REQ_F_BUFFER_SELECTED | REQ_F_INFLIGHT)) { io_clean_op(req); if (req->flags & REQ_F_INFLIGHT) { struct io_ring_ctx *ctx = req->ctx; Loading @@ -1728,6 +1723,15 @@ static void io_dismantle_req(struct io_kiocb *req) req->flags &= ~REQ_F_INFLIGHT; } } if (req->fixed_rsrc_refs) percpu_ref_put(req->fixed_rsrc_refs); if (req->async_data) kfree(req->async_data); if (req->work.creds) { put_cred(req->work.creds); req->work.creds = NULL; } } /* must to be called somewhat shortly after putting a request */ static inline void io_put_task(struct task_struct *task, int nr) Loading Loading
fs/io_uring.c +19 −15 Original line number Diff line number Diff line Loading @@ -1705,18 +1705,13 @@ static inline void io_put_file(struct io_kiocb *req, struct file *file, static void io_dismantle_req(struct io_kiocb *req) { if (req->flags & (REQ_F_NEED_CLEANUP | REQ_F_BUFFER_SELECTED)) io_clean_op(req); if (req->async_data) kfree(req->async_data); unsigned int flags = req->flags; if (req->file) io_put_file(req, req->file, (req->flags & REQ_F_FIXED_FILE)); if (req->fixed_rsrc_refs) percpu_ref_put(req->fixed_rsrc_refs); if (req->work.creds) { put_cred(req->work.creds); req->work.creds = NULL; } io_put_file(req, req->file, (flags & REQ_F_FIXED_FILE)); if (flags & (REQ_F_NEED_CLEANUP | REQ_F_BUFFER_SELECTED | REQ_F_INFLIGHT)) { io_clean_op(req); if (req->flags & REQ_F_INFLIGHT) { struct io_ring_ctx *ctx = req->ctx; Loading @@ -1728,6 +1723,15 @@ static void io_dismantle_req(struct io_kiocb *req) req->flags &= ~REQ_F_INFLIGHT; } } if (req->fixed_rsrc_refs) percpu_ref_put(req->fixed_rsrc_refs); if (req->async_data) kfree(req->async_data); if (req->work.creds) { put_cred(req->work.creds); req->work.creds = NULL; } } /* must to be called somewhat shortly after putting a request */ static inline void io_put_task(struct task_struct *task, int nr) Loading