函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__d_instantiate

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

返回类型:void

参数:

类型参数名称
struct dentry *dentry
struct inode *inode
1918  add_flags等于d_flags_for_inode(inode)
1919  WARN_ON(d_in_lookup(dentry))
1921  加自旋锁
1925  如果 protected by d_lock 按位与DCACHE_LRU_LISTthis_cpu_dec(nr_dentry_negative)
1927  hlist_add_head( & de alias list , & i_dentry)
1928  raw_write_seqcount_begin( & per dentry seqlock )
1929  __d_set_inode_and_type(dentry, inode, add_flags)
1930  raw_write_seqcount_end( & per dentry seqlock )
1931  fsnotify_update_flags(dentry)
1932  自旋锁解锁
调用者
名称描述
d_instantiate为目录项建立索引
d_instantiate_newThis should be equivalent to d_instantiate() + unlock_new_inode(),* with lockdep-related part of unlock_new_inode() done before* anything else. Use that instead of open-coding d_instantiate()/* unlock_new_inode() combinations.