函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:35:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:vfs_rmdir

函数原型:int vfs_rmdir(struct inode *dir, struct dentry *dentry)

返回类型:int

参数:

类型参数名称
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  如果error则返回:error
3807  如果非rmdir则返回:负EPERM
3810  获得目录项引用
3811  inode_lock( Where the name belongs to - NULL is * negative )
3813  error等于负EBUSY
3814  如果is_local_mountpoint(dentry)则转到:out
3817  error等于security_inode_rmdir(dir, dentry)
3818  如果error则转到:out
3821  error等于rmdir(dir, dentry)
3822  如果error则转到:out
3825  收缩高速缓存区
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  如果非error删除目录项
3836  返回:error
调用者
名称描述
do_rmdir