Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Note: drops the wqe->lock if returning true! The caller must re-acquire* the lock in that case. Some callers need to restart handling if this* happens, so we can't just re-acquire the lock on behalf of the caller.

Proto:static bool __io_worker_unuse(struct io_wqe *wqe, struct io_worker *worker)

Type:bool

Parameter:

TypeParameterName
struct io_wqe *wqe
struct io_worker *worker
138  bool dropped_lock = false
140  If creds Then
141  vert_creds - Revert a temporary subjective credentials override*@old: The credentials to be restored* Revert a temporary set of override subjective credentials to an old set,* discarding the override set.
142  creds = NULL
145  If files != restore_files Then
146  __acquire( & lock)
147  spin_unlock_irq( & lock)
148  dropped_lock = true
150  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
151  files = restore_files
152  task_unlock(current process)
155  If fs != restore_fs Then fs = restore_fs
162  If mm Then
163  If Not dropped_lock Then
164  __acquire( & lock)
165  spin_unlock_irq( & lock)
166  dropped_lock = true
168  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Used in tsk->state: )
169  set_fs(KERNEL_DS)
170  unuse_mm(mm)
171  Decrement the use count and release all resources for an mm.
172  mm = NULL
175  Return dropped_lock
Caller
NameDescribe
io_worker_exit
__io_worker_idleNo work, worker going to sleep