• Home
  • Raw
  • Download

Lines Matching full:file

13 #include <linux/file.h>
59 * anon_inode_getfile - creates a new file instance by hooking it up to an
61 * of the file
63 * @name: [in] name of the "class" of the new file
64 * @fops: [in] file operations for the new file
65 * @priv: [in] private data for the new file (will be file's private_data)
68 * Creates a new file by hooking it on a single inode. This is useful for files
71 * hence saving memory and avoiding code duplication for the file/inode/dentry
72 * setup. Returns the newly created file* or an error pointer.
74 struct file *anon_inode_getfile(const char *name, in anon_inode_getfile()
78 struct file *file; in anon_inode_getfile() local
91 file = alloc_file_pseudo(anon_inode_inode, anon_inode_mnt, name, in anon_inode_getfile()
93 if (IS_ERR(file)) in anon_inode_getfile()
96 file->f_mapping = anon_inode_inode->i_mapping; in anon_inode_getfile()
98 file->private_data = priv; in anon_inode_getfile()
100 return file; in anon_inode_getfile()
105 return file; in anon_inode_getfile()
110 * anon_inode_getfd - creates a new file instance by hooking it up to an
112 * of the file
114 * @name: [in] name of the "class" of the new file
115 * @fops: [in] file operations for the new file
116 * @priv: [in] private data for the new file (will be file's private_data)
119 * Creates a new file by hooking it on a single inode. This is useful for files
122 * hence saving memory and avoiding code duplication for the file/inode/dentry
129 struct file *file; in anon_inode_getfd() local
136 file = anon_inode_getfile(name, fops, priv, flags); in anon_inode_getfd()
137 if (IS_ERR(file)) { in anon_inode_getfd()
138 error = PTR_ERR(file); in anon_inode_getfd()
141 fd_install(fd, file); in anon_inode_getfd()