函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Insert waiter into blocker's block list.* We use a circular list so that processes can be easily woken up in* the order they blocked. The documentation doesn't require this but* it seems like the reasonable thing to do.

函数原型:static void __locks_insert_block(struct file_lock *blocker, struct file_lock *waiter, conflict(struct file_lock*,struct file_lock*))

返回类型:void

参数:

类型参数名称
struct file_lock *blocker
struct file_lock *waiter
boolconflict
801  BUG_ON(!链表为空)
803  new_blocker :
804  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(fl, & list of requests with * ->fl_blocker pointing here, fl_blocked_member)
805  如果conflict(fl, waiter)则
806  blocker等于fl
807  转到:new_blocker
809  The lock, that is blocking us 等于blocker
810  添加链表项
811  如果IS_POSIX(blocker)且非IS_OFDLCK(blocker)则locks_insert_global_blocked(waiter)
818  __locks_wake_up_blocks(waiter)
调用者
名称描述
locks_insert_blockMust be called with flc_lock held.
posix_lock_inode