函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Notify this dentry's parent about a child's events.

函数原型:int __fsnotify_parent(const struct path *path, struct dentry *dentry, __u32 mask)

返回类型:int

参数:

类型参数名称
const struct path *path
struct dentry *dentry
__u32mask
150  ret等于0
152  如果非dentrydentry等于dentry
155  如果非 protected by d_lock 按位与DCACHE_FSNOTIFY_PARENT_WATCHED的值则返回:0
158  parent等于dget_parent(dentry)
159  p_inode等于 Where the name belongs to - NULL is * negative
161  如果此条件成立可能性小(为编译器优化)(!fsnotify_inode_watches_children(p_inode))则
162  Given an inode, first check if we care what happens to our children. Inotify* and dnotify both tell their parents about events. If we care about any event* on a child we run all of our children and set a dentry flag saying that the* parent cares
163  否则如果i_fsnotify_mask按位与mask按位与Events that can be reported to backends
168  mask或等于This inode cares about things that happen to its children. Always set for* dnotify and inotify.
170  take_dentry_name_snapshot( & name, dentry)
171  如果pathret等于This is the main call to fsnotify. The VFS calls into hook specific functions* in linux/fsnotify.h. Those functions then in turn call here. Here will call* out to all of the registered fsnotify_group. Those groups can then use the
174  否则ret等于This is the main call to fsnotify. The VFS calls into hook specific functions* in linux/fsnotify.h. Those functions then in turn call here. Here will call* out to all of the registered fsnotify_group. Those groups can then use the
177  release_dentry_name_snapshot( & name)
180  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
182  返回:ret