diff options
author | Tejun Heo <tj@kernel.org> | 2016-12-27 14:49:03 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-12-27 14:49:03 -0500 |
commit | 0e67db2f9fe91937e798e3d7d22c50a8438187e1 (patch) | |
tree | f89b0ef7b69fd5b48dcb76d6568e4963ebc19779 /fs/kernfs/kernfs-internal.h | |
parent | a1d82aff5df760d933b6ea3a03805dbc2bd73eb8 (diff) | |
download | linux-0e67db2f9fe91937e798e3d7d22c50a8438187e1.tar.gz linux-0e67db2f9fe91937e798e3d7d22c50a8438187e1.tar.bz2 linux-0e67db2f9fe91937e798e3d7d22c50a8438187e1.zip |
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>
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
-rw-r--r-- | fs/kernfs/kernfs-internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h index bfd551bbf231..3100987cf8ba 100644 --- a/fs/kernfs/kernfs-internal.h +++ b/fs/kernfs/kernfs-internal.h @@ -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 |