Skip to content

Commit a457606

Browse files
ebiggersAl Viro
authored andcommitted
fs/file_table.c: Update alloc_file() comment
This comment is 5 years outdated; init_file() no longer exists. Signed-off-by: Eric Biggers <ebiggers3@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 8cc4311 commit a457606

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

‎fs/file_table.c‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,10 @@ struct file *get_empty_filp(void)
150150

151151
/**
152152
* alloc_file - allocate and initialize a 'struct file'
153-
* @mnt: the vfsmount on which the file will reside
154-
* @dentry: the dentry representing the new file
153+
*
154+
* @path: the (dentry, vfsmount) pair for the new file
155155
* @mode: the mode with which the new file will be opened
156156
* @fop: the 'struct file_operations' for the new file
157-
*
158-
* Use this instead of get_empty_filp() to get a new
159-
* 'struct file'. Do so because of the same initialization
160-
* pitfalls reasons listed for init_file(). This is a
161-
* preferred interface to using init_file().
162-
*
163-
* If all the callers of init_file() are eliminated, its
164-
* code should be moved into this function.
165157
*/
166158
struct file *alloc_file(struct path *path, fmode_t mode,
167159
const struct file_operations *fop)

0 commit comments

Comments
 (0)