函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io-wq.c Create Date:2022-07-29 10:55:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static bool __io_worker_unuse(struct io_wqe *wqe, struct io_worker *worker)

返回类型:bool

参数:

类型参数名称
struct io_wqe *wqe
struct io_worker *worker
138  bool dropped_lock = false
140  如果creds
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  如果files不等于restore_files
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(当前进程)
155  如果fs不等于restore_fsfs等于restore_fs
162  如果mm
163  如果非dropped_lock
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;* (就绪态)
169  设置寄存器值(fs)
170  unuse_mm(mm)
171  Decrement the use count and release all resources for an mm.
172  mm = NULL
175  返回:dropped_lock
调用者
名称描述
io_worker_exit
__io_worker_idleNo work, worker going to sleep