函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:If multiple processes watch the same inode with dnotify there is only one* dnotify mark in inode->i_fsnotify_marks but we chain a dnotify_struct* onto that mark. This function either attaches the new dnotify_struct onto

函数原型:static int attach_dn(struct dnotify_struct *dn, struct dnotify_mark *dn_mark, fl_owner_t id, int fd, struct file *filp, __u32 mask)

返回类型:int

参数:

类型参数名称
struct dnotify_struct *dn
struct dnotify_mark *dn_mark
fl_owner_tid
intfd
struct file *filp
__u32mask
223  odn等于dn
224  当(odn != NULL)循环
226  如果dn_owner恒等于iddn_filp恒等于filp
227  dn_fd等于fd
228  dn_mask或等于mask
229  返回:负EEXIST
231  odn等于dn_next
234  dn_mask等于mask
235  dn_fd等于fd
236  dn_filp等于filp
237  dn_owner等于id
238  dn_next等于dn
239  dn等于dn
241  返回:0
调用者
名称描述
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.