函数逻辑报告

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

函数名称:fsnotify_put_mark

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

返回类型:void

参数:

类型参数名称
struct fsnotify_mark *mark
229  conn等于READ_ONCE( Head of list of marks for an object [mark ref] )
230  void * objp = NULL
231  type等于FSNOTIFY_OBJ_TYPE_DETACHED
232  bool free_conn = false
235  如果非conn
236  如果_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATEDfsnotify_final_mark_destroy(mark)
238  返回
245  如果非_dec_and_lock - return holding spinlock if able to decrement* refcount to 0*@r: the refcount*@lock: the spinlock to be locked* Similar to atomic_dec_and_lock(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED则返回
248  hlist_del_init_rcu - deletes entry from hash list with re-initialization*@n: the element to delete from the hash list.* Note: list_unhashed() on the node return true after this. It is* useful for RCU based read lockfree traversal if the writer side
249  如果hlist_empty( & list)则
250  objp等于fsnotify_detach_connector_from_object(conn, & type)
251  free_conn = true
252  否则
253  __fsnotify_recalc_mask(conn)
255  WRITE_ONCE( Head of list of marks for an object [mark ref] , NULL)
256  自旋锁解锁
258  Drop object reference originally held by a connector
260  如果free_conn
261  加自旋锁
262  Used listing heads to free after srcu period expires 等于connector_destroy_list
263  connector_destroy_list等于conn
264  自旋锁解锁
265  queue_work - queue work on a workqueue*@wq: workqueue to use*@work: work to queue* Returns %false if @work was already on a queue, %true otherwise.* We queue the work to the CPU on which it was submitted, but if the CPU dies
273  加自旋锁
274  添加链表项
275  自旋锁解锁
276  启动延迟工作队列
调用者
名称描述
audit_put_parent
audit_alloc_mark
audit_remove_mark
create_chunkCall with group->mark_mutex held, releases it
tag_chunkhe first tagged inode becomes root of tree
prune_tree_chunksRemove tree from chunks. If 'tagged' is set, remove tree only from tagged* chunks. The function expects tagged chunks are all at the beginning of the* chunks list.
fsnotify_get_mark_safeGet mark reference when we found the mark via lockless traversal of object* list. Mark can be already removed from the list by now and on its way to be* destroyed once SRCU period ends.* Also pin the group so it doesn't disappear under us.
fsnotify_put_mark_wakePuts marks and wakes up group destruction if necessary.* Pairs with fsnotify_get_mark_safe()
fsnotify_detach_markMark mark as detached, remove it from group list
fsnotify_add_mark_lockedAttach an initialized mark to a given group and fs object.* These marks may be used for the fsnotify backend to determine which* event types should be delivered to which group.
fsnotify_clear_marks_by_groupClear any marks in a group with given type mask
fsnotify_destroy_marksDestroy all marks attached to an object via connector
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.
inotify_remove_from_idrRemove the mark from the idr (if present) and drop the reference* on the mark because it was in the idr.
inotify_update_existing_watch
inotify_new_watch
SYSCALL_DEFINE2
fanotify_remove_mark
fanotify_add_new_mark
fanotify_add_mark