函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Mark mark as detached, remove it from group list

函数原型:void fsnotify_detach_mark(struct fsnotify_mark *mark)

返回类型:void

参数:

类型参数名称
struct fsnotify_mark *mark
373  group等于 Group this mark is for. Set on mark creation, stable until last ref * is dropped
375  WARN_ON_ONCE(!是互斥锁)
376  WARN_ON_ONCE(!srcu_read_lock_held - might we be in SRCU read-side critical section?*@ssp: The srcu_struct structure to check* If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU* read-side critical section && _read - get a refcount's value*@r: the refcount* Return: the refcount's value < 1 + !!( flags [mark->lock] & FSNOTIFY_MARK_FLAG_ATTACHED))
380  加自旋锁
382  如果非 flags [mark->lock] 按位与FSNOTIFY_MARK_FLAG_ATTACHED的值则
383  自旋锁解锁
384  返回
386  flags [mark->lock] 与等于FSNOTIFY_MARK_FLAG_ATTACHED的反
387  删除链表项并重新初始化
388  自旋锁解锁
390  atomic_dec( & 1 for each mark and 1 for not being * past the point of no return when freeing * a group )
393  fsnotify_put_mark(mark)
调用者
名称描述
untag_chunk
create_chunkCall with group->mark_mutex held, releases it
fsnotify_destroy_mark
fsnotify_clear_marks_by_groupClear any marks in a group with given type mask
dnotify_flushCalled every time a file is closed. Looks first for a dnotify mark on the* inode. If one is found run all of the ->dn structures attached to that* mark for one relevant to this process closing the file and remove that* dnotify_struct
fcntl_dirnotifyWhen a process calls fcntl to attach a dnotify watch to a directory it ends* up here. Allocate both a mark for fsnotify to add and a dnotify_struct to be* attached to the fsnotify_mark.
fanotify_remove_mark