Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:fsnotify_put_mark

Proto:void fsnotify_put_mark(struct fsnotify_mark *mark)

Type:void

Parameter:

TypeParameterName
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  If Not conn Then
236  If _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_SATURATED Then fsnotify_final_mark_destroy(mark)
238  Return
245  If Not _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 Then Return
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  If hlist_empty( & list) Then
250  objp = fsnotify_detach_connector_from_object(conn, & type)
251  free_conn = true
252  Else
253  __fsnotify_recalc_mask(conn)
255  WRITE_ONCE( Head of list of marks for an object [mark ref] , NULL)
256  spin_unlock( & lock)
258  Drop object reference originally held by a connector
260  If free_conn Then
261  spin_lock( & destroy_lock)
262  Used listing heads to free after srcu period expires = connector_destroy_list
263  connector_destroy_list = conn
264  spin_unlock( & destroy_lock)
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  spin_lock( & destroy_lock)
274  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
275  spin_unlock( & destroy_lock)
276  queue_delayed_work - queue work on a workqueue after delay*@wq: workqueue to use*@dwork: delayable work to queue*@delay: number of jiffies to wait before queueing* Equivalent to queue_delayed_work_on() but tries to use the local CPU.
Caller
NameDescribe
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