Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:devpts_fill_super

Proto:static int devpts_fill_super(struct super_block *s, void *data, int silent)

Type:int

Parameter:

TypeParameterName
struct super_block *s
void *data
intsilent
450  s_iflags &= ~Ignore devices on this fs
451  s_blocksize = 1024
452  s_blocksize_bits = 10
453  s_magic = DEVPTS_SUPER_MAGIC
454  s_op = devpts_sops
455  s_d_op = simple_dentry_operations
456  s_time_gran = 1
458  error = -ENOMEM
459  s_fs_info = new_pts_fs_info(s)
460  If Not s_fs_info Then Go to fail
463  error = parse_mount_options():* Set @opts to mount options specified in @data. If an option is not* specified in @data, set it to its default value.* Note: @data may be NULL (in which case all options are set to default).
464  If error Then Go to fail
467  error = -ENOMEM
468  inode = obtain an inode
469  If Not inode Then Go to fail
471  Stat data, not accessed from path walking = 1
472  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.
473  i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR
474  i_op = simple_dir_inode_operations
475  rmer ->i_op->default_file_ops = simple_dir_operations
476  set_nlink - directly set an inode's link count*@inode: inode*@nlink: new nlink (should be non-zero)* This is a low-level filesystem helper to replace any* direct filesystem manipulation of i_nlink.
478  s_root = d_make_root(inode)
479  If Not s_root Then
480  pr_err("get root dentry failed\n")
481  Go to fail
484  error = mknod_ptmx(s)
485  If error Then Go to fail_dput
488  Return 0
489  fail_dput :
490  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
491  s_root = NULL
492  fail :
493  Return error