Lines Matching full:file

13 #include <linux/file.h>
78 static struct file *__anon_inode_getfile(const char *name, in __anon_inode_getfile()
85 struct file *file; in __anon_inode_getfile() local
93 file = ERR_CAST(inode); in __anon_inode_getfile()
99 file = ERR_PTR(-ENODEV); in __anon_inode_getfile()
109 file = alloc_file_pseudo(inode, anon_inode_mnt, name, in __anon_inode_getfile()
111 if (IS_ERR(file)) in __anon_inode_getfile()
114 file->f_mapping = inode->i_mapping; in __anon_inode_getfile()
116 file->private_data = priv; in __anon_inode_getfile()
118 return file; in __anon_inode_getfile()
124 return file; in __anon_inode_getfile()
128 * anon_inode_getfile - creates a new file instance by hooking it up to an
130 * of the file
132 * @name: [in] name of the "class" of the new file
133 * @fops: [in] file operations for the new file
134 * @priv: [in] private data for the new file (will be file's private_data)
137 * Creates a new file by hooking it on a single inode. This is useful for files
140 * hence saving memory and avoiding code duplication for the file/inode/dentry
141 * setup. Returns the newly created file* or an error pointer.
143 struct file *anon_inode_getfile(const char *name, in anon_inode_getfile()
158 struct file *file; in __anon_inode_getfd() local
165 file = __anon_inode_getfile(name, fops, priv, flags, context_inode, in __anon_inode_getfd()
167 if (IS_ERR(file)) { in __anon_inode_getfd()
168 error = PTR_ERR(file); in __anon_inode_getfd()
171 fd_install(fd, file); in __anon_inode_getfd()
181 * anon_inode_getfd - creates a new file instance by hooking it up to
183 * the "class" of the file
185 * @name: [in] name of the "class" of the new file
186 * @fops: [in] file operations for the new file
187 * @priv: [in] private data for the new file (will be file's private_data)
190 * Creates a new file by hooking it on a single inode. This is
194 * memory use and avoiding code duplication for the file/inode/dentry
195 * setup. Returns a newly created file descriptor or an error code.
210 * @name: [in] name of the "class" of the new file
211 * @fops: [in] file operations for the new file
212 * @priv: [in] private data for the new file (will be file's private_data)