函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__d_add

函数原型:static inline void __d_add(struct dentry *dentry, struct inode *inode)

返回类型:void

参数:

类型参数名称
struct dentry *dentry
struct inode *inode>i_lock held if inode is non-NULL
2643  struct inode * dir = NULL
2645  加自旋锁
2646  如果此条件成立可能性小(为编译器优化)(d_in_lookup(dentry))则
2647  dir等于 Where the name belongs to - NULL is * negative
2648  n等于start_dir_add(dir)
2649  __d_lookup_done(dentry)
2651  如果>i_lock held if inode is non-NULL
2652  add_flags等于d_flags_for_inode(>i_lock held if inode is non-NULL )
2653  hlist_add_head( & de alias list , & i_dentry)
2654  raw_write_seqcount_begin( & per dentry seqlock )
2655  __d_set_inode_and_type(dentry, >i_lock held if inode is non-NULL , add_flags)
2656  raw_write_seqcount_end( & per dentry seqlock )
2657  fsnotify_update_flags(dentry)
2659  __d_rehash(dentry)
2660  如果dirend_dir_add(dir, n)
2662  自旋锁解锁
2663  如果>i_lock held if inode is non-NULL 自旋锁解锁
调用者
名称描述
d_add添加目录项到哈希队列
d_splice_alias链接目录项