函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:filename_create

函数原型:static struct dentry *filename_create(int dfd, struct filename *name, struct path *path, unsigned int lookup_flags)

返回类型:struct dentry

参数:

类型参数名称
intdfd
struct filename *name
struct path *path
unsigned intlookup_flags
3547  dentry等于错误号
3552  is_dir等于lookup_flags按位与quire a directory
3558  lookup_flags与等于ll ->d_revalidate() to trust no cache
3560  name等于filename_parentat(dfd, name, lookup_flags, path, & last, & type)
3561  如果是错误则返回:错误指示
3568  如果此条件成立可能性小(为编译器优化)(type != LAST_NORM)则转到:out
3572  err2等于mnt_want_write(mnt)
3576  lookup_flags或等于... in object creation 按位或... in exclusive creation
3577  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
3578  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.
3579  如果是错误则转到:unlock
3582  error等于负EEXIST
3583  如果d_is_positive(dentry)则转到:fail
3592  如果此条件成立可能性小(为编译器优化)(!is_dir && name[len])则
3593  error等于负ENOENT
3594  转到:fail
3596  如果此条件成立可能性小(为编译器优化)(err2)则
3597  error等于err2
3598  转到:fail
3600  putname(name)
3601  返回:dentry
3602  fail :
3603  dput(dentry)
3604  dentry等于错误号
3605  unlock :
3606  inode_unlock( Where the name belongs to - NULL is * negative )
3607  如果非err2mnt_drop_write(mnt)
3609  out :
3610  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.
3611  putname(name)
3612  返回:dentry
调用者
名称描述
kern_path_create
user_path_create