Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_wqe_cancel_cb_work

Proto:static enum io_wq_cancel io_wqe_cancel_cb_work(struct io_wqe *wqe, work_cancel_fn *cancel, void *cancel_data)

Type:enum io_wq_cancel

Parameter:

TypeParameterName
struct io_wqe *wqe
work_cancel_fn *cancel
void *cancel_data
862  struct io_cb_cancel_data data = {wqe = wqe, cancel = cancel, caller_data = cancel_data, }
870  bool found = false
872  spin_lock_irqsave( & lock, flags)
874  work = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(node, structio_wq_work, list)
876  If cancel(work, cancel_data) Then
877  wq_node_del( & work_list, node, prev)
878  found = true
879  Break
882  spin_unlock_irqrestore( & lock, flags)
884  If found Then
885  flags |= IO_WQ_WORK_CANCEL
886  func( & work)
887  Return cancelled before started
890  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
891  found = Iterate the passed in list and call the specific function for each* worker that isn't exiting
892  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
893  Return If found Then found, running, and attempted cancelled Else work not found
Caller
NameDescribe
io_wq_cancel_cb