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()
160 * @name: [in] name of the "class" of the new file
161 * @fops: [in] file operations for the new file
162 * @priv: [in] private data for the new file (will be file's private_data)
168 * reference to it is not held. Returns the newly created file* or an error
171 struct file *anon_inode_getfile_secure(const char *name, in anon_inode_getfile_secure()
187 struct file *file; in __anon_inode_getfd() local
194 file = __anon_inode_getfile(name, fops, priv, flags, context_inode, in __anon_inode_getfd()
196 if (IS_ERR(file)) { in __anon_inode_getfd()
197 error = PTR_ERR(file); in __anon_inode_getfd()
200 fd_install(fd, file); in __anon_inode_getfd()
210 * anon_inode_getfd - creates a new file instance by hooking it up to
212 * the "class" of the file
214 * @name: [in] name of the "class" of the new file
215 * @fops: [in] file operations for the new file
216 * @priv: [in] private data for the new file (will be file's private_data)
219 * Creates a new file by hooking it on a single inode. This is
223 * memory use and avoiding code duplication for the file/inode/dentry
224 * setup. Returns a newly created file descriptor or an error code.
239 * @name: [in] name of the "class" of the new file
240 * @fops: [in] file operations for the new file
241 * @priv: [in] private data for the new file (will be file's private_data)