Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vfs_rmdir

Proto:int vfs_rmdir(struct inode *dir, struct dentry *dentry)

Type:int

Parameter:

TypeParameterName
struct inode *dir
struct dentry *dentry
3802  error = Check whether we can remove a link victim from directory dir, check* whether the type of victim is right.* 1. We can't do it if dir is read-only (done in permission())* 2. We should have write and exec permissions on dir* 3
3804  If error Then Return error
3807  If Not rmdir Then Return -EPERM
3810  get a reference to a dentry
3811  inode_lock( Where the name belongs to - NULL is * negative )
3813  error = -EBUSY
3814  If is_local_mountpoint(dentry) Then Go to out
3817  error = security_inode_rmdir(dir, dentry)
3818  If error Then Go to out
3821  error = rmdir(dir, dentry)
3822  If error Then Go to out
3825  prune dcache
3826  i_flags |= moved, but still open directory
3827  dont_mount(dentry)
3828  detach_mounts(dentry)
3829  snotify_rmdir - directory 'name' was removed* Caller must make sure that dentry->d_name is stable.
3831  out :
3832  inode_unlock( Where the name belongs to - NULL is * negative )
3833  dput(dentry)
3834  If Not error Then delete a dentry
3836  Return error
Caller
NameDescribe
do_rmdir