函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_rmdir

函数原型:long do_rmdir(int dfd, const char __user *pathname)

返回类型:long

参数:

类型参数名称
intdfd
const char __user *pathname
3842  error等于0
3848  lookup_flags等于0
3849  retry :
3850  name等于filename_parentat(dfd, getname(pathname), lookup_flags, & path, & last, & type)
3852  如果是错误则返回:错误
3856  :type恒等于LAST_DOTDOT
3857  error等于负ENOTEMPTY
3858  转到:exit1
3859  :type恒等于LAST_DOT
3860  error等于负EINVAL
3861  转到:exit1
3862  :type恒等于LAST_ROOT
3863  error等于负EBUSY
3864  转到:exit1
3867  error等于mnt_want_write(mnt)
3868  如果error则转到:exit1
3871  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
3872  dentry等于Parent directory has inode locked exclusive. This is one* and only case when ->lookup() gets called on non in-lookup* dentries - as the matter of fact, this only gets called* when directory is guaranteed to have no in-lookup children* at all.
3873  error等于错误
3874  如果是错误则转到:exit2
3876  如果非 Where the name belongs to - NULL is * negative
3877  error等于负ENOENT
3878  转到:exit3
3880  error等于security_path_rmdir( & path, dentry)
3881  如果error则转到:exit3
3883  error等于vfs_rmdir( Where the name belongs to - NULL is * negative , dentry)
3884  exit3 :
3885  dput(dentry)
3886  exit2 :
3887  inode_unlock( Where the name belongs to - NULL is * negative )
3888  mnt_drop_write(mnt)
3889  exit1 :
3890  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
3891  putname(name)
3892  如果ry_estale - determine whether the caller should retry an operation*@error: the error that would currently be returned*@flags: flags being used for next lookup attempt* Check to see if the error code was -ESTALE, and then determine whether
3893  lookup_flags或等于ll ->d_revalidate() to trust no cache
3894  转到:retry
3896  返回:error
调用者
名称描述
SYSCALL_DEFINE1
SYSCALL_DEFINE3
ksys_rmdir