X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=io_uring%2Frsrc.h;h=d60c758326b423d6922eae58830c28fc904e2cc3;hb=refs%2Fheads%2Ftizen-6.1.y;hp=81445a477622bcd73286406b31f27b40053981e8;hpb=479174d402bcf60789106eedc4def3957c060bad;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h index 81445a4..d60c758 100644 --- a/io_uring/rsrc.h +++ b/io_uring/rsrc.h @@ -143,15 +143,13 @@ static inline void io_req_set_rsrc_node(struct io_kiocb *req, unsigned int issue_flags) { if (!req->rsrc_node) { - req->rsrc_node = ctx->rsrc_node; + io_ring_submit_lock(ctx, issue_flags); - if (!(issue_flags & IO_URING_F_UNLOCKED)) { - lockdep_assert_held(&ctx->uring_lock); + lockdep_assert_held(&ctx->uring_lock); - io_charge_rsrc_node(ctx); - } else { - percpu_ref_get(&req->rsrc_node->refs); - } + req->rsrc_node = ctx->rsrc_node; + io_charge_rsrc_node(ctx); + io_ring_submit_unlock(ctx, issue_flags); } }