函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mknod_ptmx

函数原型:static int mknod_ptmx(struct super_block *sb)

返回类型:int

参数:

类型参数名称
struct super_block *sb
325  rc等于负ENOMEM
328  root等于s_root
329  fsi等于DEVPTS_SB(sb)
330  opts等于mount_opts
331  ptmx_uid等于current_fsuid()
332  ptmx_gid等于current_fsgid()
334  inode_lock(获得目录项的索引节点)
337  如果ptmx_dentry
338  rc等于0
339  转到:out
342  dentry等于d_alloc_name(root, "ptmx")
343  如果非dentry
344  打印错误信息("Unable to alloc dentry for ptmx node\n")
345  转到:out
351  inode等于取新的索引节点
352  如果非inode
353  打印错误信息("Unable to alloc inode for ptmx node\n")
354  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
355  转到:out
358  Stat data, not accessed from path walking 等于2
359  i_mtime等于i_atime等于i_ctime等于rrent_time - Return FS time*@inode: inode.* Return the current time truncated to the time granularity supported by* the fs.* Note that inode and inode->sb cannot be NULL.* Otherwise, the function warns and returns time without truncation.
361  mode等于S_IFCHR按位或ptmxmode
362  init_special_inode(inode, mode, MKDEV(TTYAUX_MAJOR, 2))
363  i_uid等于ptmx_uid
364  i_gid等于ptmx_gid
366  添加目录项到哈希队列
368  ptmx_dentry等于dentry
369  rc等于0
370  out :
371  inode_unlock(获得目录项的索引节点)
372  返回:rc
调用者
名称描述
devpts_fill_super