函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Attach 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.

函数原型:int fsnotify_add_mark_locked(struct fsnotify_mark *mark, fsnotify_connp_t *connp, unsigned int type, int allow_dups, __kernel_fsid_t *fsid)

返回类型:int

参数:

类型参数名称
struct fsnotify_mark *mark
fsnotify_connp_t *connp
unsigned inttype
intallow_dups
__kernel_fsid_t *fsid
640  group等于 Group this mark is for. Set on mark creation, stable until last ref * is dropped
641  ret等于0
643  BUG_ON(!是互斥锁)
651  加自旋锁
652  flags [mark->lock] 或等于FSNOTIFY_MARK_FLAG_ALIVE按位或FSNOTIFY_MARK_FLAG_ATTACHED
654  添加链表项
655  atomic_inc( & 1 for each mark and 1 for not being * past the point of no return when freeing * a group )
656  fsnotify_get_mark(mark)
657  自旋锁解锁
659  ret等于Add mark into proper place in given list of marks. These marks may be used* for the fsnotify backend to determine which event types should be delivered* to which group and for which inodes. These marks are ordered according to
660  如果ret则转到:err
663  如果 Mask this mark is for [mark->lock, group->mark_mutex] Calculate mask of events for a list of marks. The caller must make sure* connector and connector->obj cannot disappear under us. Callers achieve* this by holding a mark->lock or mark->group->mark_mutex for a mark on this* list.
666  返回:ret
667  err :
668  加自旋锁
669  flags [mark->lock] 与等于FSNOTIFY_MARK_FLAG_ALIVE按位或FSNOTIFY_MARK_FLAG_ATTACHED的值的反
671  删除链表项并重新初始化
672  自旋锁解锁
673  atomic_dec( & 1 for each mark and 1 for not being * past the point of no return when freeing * a group )
675  fsnotify_put_mark(mark)
676  返回:ret
调用者
名称描述
fsnotify_add_mark
fanotify_add_new_mark