函数逻辑报告

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

函数名称:do_mknodat

函数原型:long do_mknodat(int dfd, const char __user *filename, umode_t mode, unsigned int dev)

返回类型:long

参数:

类型参数名称
intdfd
const char __user *filename
umode_tmode
unsigned intdev
3690  lookup_flags等于0
3692  error等于may_mknod(mode)
3693  如果error则返回:error
3695  retry :
3696  dentry等于user_path_create(dfd, filename, & path, lookup_flags)
3697  如果是错误则返回:错误
3700  如果非IS_POSIXACL( Where the name belongs to - NULL is * negative )则mode与等于current_umask()的反
3702  error等于security_path_mknod( & path, dentry, mode, dev)
3703  如果error则转到:out
3706  : & == 0
3706  : & == S_IFREG
3707  error等于vfs_create( Where the name belongs to - NULL is * negative , dentry, mode, true)
3708  如果非errorima_post_path_mknod(dentry)
3710  退出
3711  : & == S_IFCHR
3711  : & == S_IFBLK
3712  error等于vfs_mknod( Where the name belongs to - NULL is * negative , dentry, mode, new_decode_dev(dev))
3714  退出
3715  : & == S_IFIFO
3715  : & == S_IFSOCK
3716  error等于vfs_mknod( Where the name belongs to - NULL is * negative , dentry, mode, 0)
3717  退出
3719  out :
3720  done_path_create( & path, dentry)
3721  如果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
3722  lookup_flags或等于ll ->d_revalidate() to trust no cache
3723  转到:retry
3725  返回:error
调用者
名称描述
SYSCALL_DEFINE4
SYSCALL_DEFINE3
ksys_mknod