mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
kernfs: add kernfs_ops->open/release() callbacks
Add ->open/release() methods to kernfs_ops. ->open() is called when the file is opened and ->release() when the file is either released or severed. These callbacks can be used, for example, to manage persistent caching objects over multiple seq_file iterations. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Acked-by: Zefan Li <lizefan@huawei.com>
This commit is contained in:
parent
a1d82aff5d
commit
0e67db2f9f
4 changed files with 57 additions and 8 deletions
|
@ -104,7 +104,7 @@ struct kernfs_node *kernfs_new_node(struct kernfs_node *parent,
|
|||
*/
|
||||
extern const struct file_operations kernfs_file_fops;
|
||||
|
||||
void kernfs_unmap_bin_file(struct kernfs_node *kn);
|
||||
void kernfs_drain_open_files(struct kernfs_node *kn);
|
||||
|
||||
/*
|
||||
* symlink.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue