Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:fanotify_add_mark

Proto:static int fanotify_add_mark(struct fsnotify_group *group, fsnotify_connp_t *connp, unsigned int type, __u32 mask, unsigned int flags, __kernel_fsid_t *fsid)

Type:int

Parameter:

TypeParameterName
struct fsnotify_group *group
fsnotify_connp_t *connp
unsigned inttype
__u32mask
unsigned intflags
__kernel_fsid_t *fsid
711  mutex_lock( & protect marks_list )
712  fsn_mark = Given a list of marks, find the mark associated with given group. If found* take a reference to that mark and return it, else return NULL.
713  If Not fsn_mark Then
714  fsn_mark = fanotify_add_new_mark(group, connp, type, fsid)
715  If IS_ERR(fsn_mark) Then
717  Return PTR_ERR(fsn_mark)
720  added = fanotify_mark_add_to_mask(fsn_mark, mask, flags)
721  If added & ~fsnotify_conn_mask( Head of list of marks for an object [mark ref] ) Then 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.
723  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
725  fsnotify_put_mark(fsn_mark)
726  Return 0
Caller
NameDescribe
fanotify_add_vfsmount_mark
fanotify_add_sb_mark
fanotify_add_inode_mark