函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:static struct dentry *__lookup_hash(const struct qstr *name, struct dentry *base, unsigned int flags)

返回类型:struct dentry

参数:

类型参数名称
const struct qstr *name
struct dentry *base
unsigned intflags
1531  dentry等于This looks up the name in dcache and possibly revalidates the found dentry.* NULL is returned if the dentry does not exist in the cache.
1533  dir等于 Where the name belongs to - NULL is * negative
1535  如果dentry则返回:dentry
1539  如果此条件成立可能性小(为编译器优化)(IS_DEADDIR(dir))则返回:错误号
1542  dentry等于分配高速缓存区
1543  如果此条件成立可能性小(为编译器优化)(!dentry)则返回:错误号
1546  old等于lookup(dir, dentry, flags)
1547  如果此条件成立可能性小(为编译器优化)(old)则
1548  dput(dentry)
1549  dentry等于old
1551  返回:dentry
调用者
名称描述
kern_path_lockeddoes lookup, returns the object with parent locked
filename_create
do_rmdir
do_unlinkatMake 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.
do_renameat2