Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:anon_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

Proto:struct file *anon_inode_getfile(const char *name, const struct file_operations *fops, void *priv, int flags)

Type:struct file

Parameter:

TypeParameterName
const char *name
const struct file_operations *fops
void *priv
intflags
80  If IS_ERR(anon_inode_inode) Then Return ERR_PTR( - ENODEV)
83  If owner && Not try_module_get(owner) Then Return ERR_PTR( - ENOENT)
90  get additional reference to inode; caller must already hold one.
91  file = alloc_file_pseudo(anon_inode_inode, anon_inode_mnt, name, flags & (O_ACCMODE | O_NONBLOCK), fops)
93  If IS_ERR(file) Then Go to err
96  f_mapping = i_mapping
98  needed for tty driver, and maybe others = priv
100  Return file
102  err :
103  put an inode
104  module_put(owner)
105  Return file
Caller
NameDescribe
anon_inode_getfdanon_inode_getfd - 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
io_uring_get_fdAllocate an anonymous fd, this is what constitutes the application* visible backing of an io_uring instance. The application mmaps this* fd to gain access to the SQ/CQ ring details. If UNIX sockets are enabled,
do_epoll_createOpen an eventpoll file descriptor.