函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloc_file_pseudo

函数原型:struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, const char *name, int flags, const struct file_operations *fops)

返回类型:struct file

参数:

类型参数名称
struct inode *inode
struct vfsmount *mnt
const char *name
intflags
const struct file_operations *fops
218  static const struct dentry_operations anon_ops = {d_dname = simple_dname}
221  this等于QSTR_INIT(name, strlen(name))
225  dentry等于d_alloc_pseudo( pointer to superblock , & this)
226  如果非dentry则返回:错误号
228  如果非s_d_opd_set_d_op(dentry, & anon_ops)
230  mnt等于mntget(mnt)
231  为目录项建立索引
232  file等于alloc_file - allocate and initialize a 'struct file'*@path: the (dentry, vfsmount) pair for the new file*@flags: O_... flags with which the new file will be opened*@fop: the 'struct file_operations' for the new file
233  如果是错误
234  ihold(inode)
235  path_put( & path)
237  返回:file
调用者
名称描述
create_pipe_files
anon_inode_getfileanon_inode_getfile - creates a new file instance by hooking it up to an* anonymous inode, and a dentry that describe the "class"* of the file*@name: [in] name of the "class" of the new file*@fops: [in] file operations for the new file*@priv: [in] private
aio_private_file
__shmem_file_setupmmon code