提交 a457606a 编写于 作者: E Eric Biggers 提交者: Al Viro

fs/file_table.c: Update alloc_file() comment

This comment is 5 years outdated; init_file() no longer exists.
Signed-off-by: NEric Biggers <ebiggers3@gmail.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 8cc43116
...@@ -150,18 +150,10 @@ struct file *get_empty_filp(void) ...@@ -150,18 +150,10 @@ struct file *get_empty_filp(void)
/** /**
* alloc_file - allocate and initialize a 'struct file' * alloc_file - allocate and initialize a 'struct file'
* @mnt: the vfsmount on which the file will reside *
* @dentry: the dentry representing the new file * @path: the (dentry, vfsmount) pair for the new file
* @mode: the mode with which the new file will be opened * @mode: the mode with which the new file will be opened
* @fop: the 'struct file_operations' for the new file * @fop: the 'struct file_operations' for the new file
*
* Use this instead of get_empty_filp() to get a new
* 'struct file'. Do so because of the same initialization
* pitfalls reasons listed for init_file(). This is a
* preferred interface to using init_file().
*
* If all the callers of init_file() are eliminated, its
* code should be moved into this function.
*/ */
struct file *alloc_file(struct path *path, fmode_t mode, struct file *alloc_file(struct path *path, fmode_t mode,
const struct file_operations *fop) const struct file_operations *fop)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册