函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Make sure that the actual truncation of the file will occur outside its* directory's i_mutex. Truncate can take a long time if there is a lot of* writeout happening, and we don't want to prevent access to the directory* while waiting on the I/O.

函数原型:long do_unlinkat(int dfd, struct filename *name)

返回类型:long

参数:

类型参数名称
intdfd
struct filename *name
3976  struct inode * inode = NULL
3977  struct inode * delegated_inode = NULL
3978  lookup_flags等于0
3979  retry :
3980  name等于filename_parentat(dfd, name, lookup_flags, & path, & last, & type)
3981  如果是错误则返回:错误
3984  error等于负EISDIR
3985  如果type不等于LAST_NORM则转到:exit1
3988  error等于mnt_want_write(mnt)
3989  如果error则转到:exit1
3991  retry_deleg :
3992  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
3993  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.
3994  error等于错误
3995  如果非是错误
3997  如果name[len]则转到:slashes
3999  inode等于 Where the name belongs to - NULL is * negative
4000  如果d_is_negative(dentry)则转到:slashes
4002  ihold(inode)
4003  error等于security_path_unlink( & path, dentry)
4004  如果error则转到:exit2
4006  error等于vfs_unlink - unlink a filesystem object*@dir: parent directory*@dentry: victim*@delegated_inode: returns victim inode, if the inode is delegated.* The caller must hold dir->i_mutex.* If vfs_unlink discovers a delegation, it will return -EWOULDBLOCK and
4007  exit2 :
4008  dput(dentry)
4010  inode_unlock( Where the name belongs to - NULL is * negative )
4011  如果inode放置一个索引节点
4013  inode = NULL
4014  如果delegated_inode
4015  error等于break_deleg_wait( & delegated_inode)
4016  如果非error则转到:retry_deleg
4019  mnt_drop_write(mnt)
4020  exit1 :
4021  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.
4022  如果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
4023  lookup_flags或等于ll ->d_revalidate() to trust no cache
4024  inode = NULL
4025  转到:retry
4027  putname(name)
4028  返回:error
4030  slashes :
4031  如果d_is_negative(dentry)则error等于负ENOENT
4033  否则如果d_is_dir(dentry)则error等于负EISDIR
4035  否则error等于负ENOTDIR
4037  转到:exit2
调用者
名称描述
SYSCALL_DEFINE3
SYSCALL_DEFINE1
do_coredump
ksys_unlink