Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:io_uring_cancel_files

Proto:static void io_uring_cancel_files(struct io_ring_ctx *ctx, struct files_struct *files)

Type:void

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
struct files_struct *files
5039  DEFINE_WAIT(wait)
5041  When Not list_empty_careful - tests whether a list is empty and not being modified*@head: the list to test* Description:* tests whether a list is empty _and_ checks that no other CPU might be* in the process of modifying either member (next or prev)* NOTE: using cycle
5042  struct io_kiocb * cancel_req = NULL
5044  spin_lock_irq( & inflight_lock)
5046  If files != files Then Continue
5049  If Not _inc_not_zero - increment a refcount unless it is 0*@r: the refcount to increment* Similar to atomic_inc_not_zero(), but will saturate at REFCOUNT_SATURATED* and WARN.* Provides no memory ordering, it is assumed the caller has guaranteed the Then Continue
5051  cancel_req = req
5052  Break
5054  If cancel_req Then Note: we use "set_current_state()" _after_ the wait-queue add,* because we need a memory barrier there on SMP, so that any* wake-function that tests for the wait-queue being active* will be guaranteed to see waitqueue addition _or_ subsequent
5057  spin_unlock_irq( & inflight_lock)
5060  If Not cancel_req Then Break
5063  io_wq_cancel_work( IO offload , & work)
5064  io_put_req(cancel_req)
5065  schedule()
5067  sh_wait - clean up after waiting in a queue*@wq_head: waitqueue waited on*@wq_entry: wait descriptor* Sets current thread back to running state and removes* the wait descriptor from the given waitqueue if still* queued.
Caller
NameDescribe
io_uring_flush