Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static void __locks_insert_block(struct file_lock *blocker, struct file_lock *waiter, conflict(struct file_lock*,struct file_lock*))

Type:void

Parameter:

TypeParameterName
struct file_lock *blocker
struct file_lock *waiter
boolconflict
801  BUG_ON(!list_empty - tests whether a list is empty*@head: the list to test.)
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  If conflict(fl, waiter) Then
806  blocker = fl
807  Go to new_blocker
809  The lock, that is blocking us = blocker
810  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
811  If IS_POSIX(blocker) && Not IS_OFDLCK(blocker) Then locks_insert_global_blocked(waiter)
818  __locks_wake_up_blocks(waiter)
Caller
NameDescribe
locks_insert_blockMust be called with flc_lock held.
posix_lock_inode