Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:p1 and p2 should be directories on the same fs.

Proto:struct dentry *lock_rename(struct dentry *p1, struct dentry *p2)

Type:struct dentry

Parameter:

TypeParameterName
struct dentry *p1
struct dentry *p2
2805  If p1 == p2 Then
2806  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
2807  Return NULL
2810  mutex_lock( & s_vfs_rename_mutex)
2812  p = d_ancestor(p2, p1)
2813  If p Then
2814  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
2815  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_CHILD)
2816  Return p
2819  p = d_ancestor(p1, p2)
2820  If p Then
2821  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
2822  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_CHILD)
2823  Return p
2826  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
2827  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT2)
2828  Return NULL
Caller
NameDescribe
do_renameat2