Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dcache.c Create Date:2022-07-28 20:07:30
Last Modify:2020-03-18 10:27:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__d_add

Proto:static inline void __d_add(struct dentry *dentry, struct inode *inode)

Type:void

Parameter:

TypeParameterName
struct dentry *dentry
struct inode *inode>i_lock held if inode is non-NULL
2643  struct inode * dir = NULL
2645  spin_lock( & d_lock)
2646  If Value for the false possibility is greater at compile time(d_in_lookup(dentry)) Then
2647  dir = Where the name belongs to - NULL is * negative
2648  n = start_dir_add(dir)
2649  __d_lookup_done(dentry)
2651  If >i_lock held if inode is non-NULL Then
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  If dir Then end_dir_add(dir, n)
2662  spin_unlock( & d_lock)
2663  If >i_lock held if inode is non-NULL Then spin_unlock( & _blocks, i_bytes, maybe i_size )
Caller
NameDescribe
d_addd_add - add dentry to hash queues*@entry: dentry to add*@inode: The inode to attach to this dentry* This adds the entry to the hash queues and initializes @inode.* The entry was actually filled in earlier during d_alloc().
d_splice_aliassplice a disconnected dentry into the tree if one exists