Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Mains fsnotify call where events are delivered to dnotify.* Find the dnotify mark on the relevant inode, run the list of dnotify structs* on that mark and determine which of them has expressed interest in receiving* events of this type

Proto:static int dnotify_handle_event(struct fsnotify_group *group, struct inode *inode, unsigned int mask, const void *data, int data_type, const struct qstr *file_name, unsigned int cookie, struct fsnotify_iter_info *iter_info)

Type:int

Parameter:

TypeParameterName
struct fsnotify_group *group
struct inode *inode
unsigned intmask
const void *data
intdata_type
const struct qstr *file_name
unsigned intcookie
struct fsnotify_iter_info *iter_info
79  inode_mark = fsnotify_iter_inode_mark(iter_info)
84  test_mask = mask & ~This inode cares about things that happen to its children. Always set for* dnotify and inotify.
87  If Not S_ISDIR(i_mode) Then Return 0
90  If WARN_ON(fsnotify_iter_vfsmount_mark(iter_info)) Then Return 0
93  dn_mark = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(inode_mark, structdnotify_mark, fsn_mark)
95  spin_lock( & Protects inode / mnt pointers, flags, masks )
96  prev = dn
97  When ((dn = * prev) != NULL) cycle
98  If (dn_mask & test_mask) == 0 Then
99  prev = dn_next
100  Continue
102  fown = f_owner
103  send_sigio(fown, dn_fd, put message available )
104  If dn_mask & dnotify multishot Then prev = dn_next
106  Else
107  prev = dn_next
113  spin_unlock( & Protects inode / mnt pointers, flags, masks )
115  Return 0