Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This helper attempts to cope with remotely renamed directories* It assumes that the caller is already holding* Note: If ever the locking in lock_rename() changes, then please* remember to update this too...

Proto:static int __d_unalias(struct inode *inode, struct dentry *dentry, struct dentry *alias)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct dentry *dentry>d_parent->d_inode->i_mutex, and rename_lock
struct dentry *alias
2951  struct mutex * m1 = NULL
2952  struct rw_semaphore * m2 = NULL
2953  ret = -ESTALE
2956  If parent directory == parent directory Then Go to out_unalias
2960  If Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically Then Go to out_err
2962  m1 = s_vfs_rename_mutex
2963  If Not inode_trylock_shared( Where the name belongs to - NULL is * negative ) Then Go to out_err
2965  m2 = i_rwsem
2966  out_unalias :
2967  __d_move - move a dentry*@dentry: entry to move*@target: new dentry*@exchange: exchange the two dentries* Update the dcache to reflect the move of a file name
2968  ret = 0
2969  out_err :
2970  If m2 Then lease a read lock
2972  If m1 Then mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
2974  Return ret
Caller
NameDescribe
d_splice_aliassplice a disconnected dentry into the tree if one exists