diff options
author | Imran Khan <[email protected]> | 2022-03-24 21:30:39 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-04-27 09:51:57 +0200 |
commit | bd900901b8d1838bf1b6e63063e0025fca42d283 (patch) | |
tree | 85d696920282480cd55649f05009529b5f4d8a5e /drivers/base/firmware_loader/main.c | |
parent | 6423d2951087231706246f81851067f7f0593d4a (diff) |
kernfs: Remove reference counting for kernfs_open_node.
The decision to free kernfs_open_node object in kernfs_put_open_node can
be taken based on whether kernfs_open_node->files list is empty or not. As
far as kernfs_drain_open_files is concerned it can't overlap with
kernfs_fops_open and hence can check for ->attr.open optimistically
(if ->attr.open is NULL) or under kernfs_open_file_mutex (if it needs to
traverse the ->files list.) Thus kernfs_drain_open_files can work w/o ref
counting involved kernfs_open_node as well.
So remove ->refcnt and modify the above mentioned users accordingly.
Suggested by: Al Viro <[email protected]>
Signed-off-by: Imran Khan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/base/firmware_loader/main.c')
0 files changed, 0 insertions, 0 deletions