Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_mknodat

Proto:long do_mknodat(int dfd, const char __user *filename, umode_t mode, unsigned int dev)

Type:long

Parameter:

TypeParameterName
intdfd
const char __user *filename
umode_tmode
unsigned intdev
3690  lookup_flags = 0
3692  error = may_mknod(mode)
3693  If error Then Return error
3695  retry :
3696  dentry = user_path_create(dfd, filename, & path, lookup_flags)
3697  If IS_ERR(dentry) Then Return PTR_ERR(dentry)
3700  If Not IS_POSIXACL( Where the name belongs to - NULL is * negative ) Then mode &= ~current_umask()
3702  error = security_path_mknod( & path, dentry, mode, dev)
3703  If error Then Go to out
3706  Case & == 0
3706  Case & == S_IFREG
3707  error = vfs_create( Where the name belongs to - NULL is * negative , dentry, mode, true)
3708  If Not error Then ima_post_path_mknod(dentry)
3710  Break
3711  Case & == S_IFCHR
3711  Case & == S_IFBLK
3712  error = vfs_mknod( Where the name belongs to - NULL is * negative , dentry, mode, new_decode_dev(dev))
3714  Break
3715  Case & == S_IFIFO
3715  Case & == S_IFSOCK
3716  error = vfs_mknod( Where the name belongs to - NULL is * negative , dentry, mode, 0)
3717  Break
3719  out :
3720  done_path_create( & path, dentry)
3721  If 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 Then
3722  lookup_flags |= ll ->d_revalidate() to trust no cache
3723  Go to retry
3725  Return error
Caller
NameDescribe
SYSCALL_DEFINE4
SYSCALL_DEFINE3
ksys_mknod