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_work

Proto:static enum io_wq_cancel io_wqe_cancel_work(struct io_wqe *wqe, struct io_wq_work *cwork)

Type:enum io_wq_cancel

Parameter:

TypeParameterName
struct io_wqe *wqe
struct io_wq_work *cwork
938  bool found = false
940  flags |= IO_WQ_WORK_CANCEL
947  spin_lock_irqsave( & lock, flags)
949  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)
951  If work == cwork Then
952  wq_node_del( & work_list, node, prev)
953  found = true
954  Break
957  spin_unlock_irqrestore( & lock, flags)
959  If found Then
960  flags |= IO_WQ_WORK_CANCEL
961  func( & work)
962  Return cancelled before started
971  _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
972  found = Iterate the passed in list and call the specific function for each* worker that isn't exiting
973  _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()
974  Return If found Then found, running, and attempted cancelled Else work not found
Caller
NameDescribe
io_wq_cancel_work