diff options
author | Tejun Heo <tj@kernel.org> | 2016-12-27 22:49:03 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-12-27 22:49:03 +0300 |
commit | 0e67db2f9fe91937e798e3d7d22c50a8438187e1 (patch) | |
tree | f89b0ef7b69fd5b48dcb76d6568e4963ebc19779 /fs/kernfs/dir.c | |
parent | a1d82aff5df760d933b6ea3a03805dbc2bd73eb8 (diff) | |
download | linux-0e67db2f9fe91937e798e3d7d22c50a8438187e1.tar.xz |
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/dir.c')
-rw-r--r-- | fs/kernfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index cf4c636ff4da..0b9d23bcceb5 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -468,7 +468,7 @@ static void kernfs_drain(struct kernfs_node *kn) rwsem_release(&kn->dep_map, 1, _RET_IP_); } - kernfs_unmap_bin_file(kn); + kernfs_drain_open_files(kn); mutex_lock(&kernfs_mutex); } |