Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\file_table.c Create Date:2022-07-28 20:01:52
Last Modify:2020-03-18 10:20:10 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:alloc_file_pseudo

Proto:struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, const char *name, int flags, const struct file_operations *fops)

Type:struct file

Parameter:

TypeParameterName
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  If Not dentry Then Return ERR_PTR( - ENOMEM)
228  If Not s_d_op Then d_set_d_op(dentry, & anon_ops)
230  mnt = mntget(mnt)
231  These are the low-level FS interfaces to the dcache..
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  If IS_ERR(file) Then
234  ihold(inode)
235  path_put( & path)
237  Return file
Caller
NameDescribe
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