diff options
author | Tejun Heo <[email protected]> | 2022-08-27 19:04:36 -1000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-09-01 18:08:44 +0200 |
commit | 2d7f9f8c1815707e9ddb454648a523efc67a04d3 (patch) | |
tree | d630d65175bf01dcfc4fa2119b86e53378fc8733 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | bdb2fd7fc56e197a63c0b0e7e07d25d5e20e7c72 (diff) |
kernfs: Improve kernfs_drain() and always call on removal
__kernfs_remove() was skipping draining based on KERNFS_ACTIVATED - whether
the node has ever been activated since creation. Instead, update it to
always call kernfs_drain() which now drains or skips based on the precise
drain conditions. This ensures that the nodes will be deactivated and
drained regardless of their states.
This doesn't make meaningful difference now but will enable deactivating and
draining nodes dynamically by making removals safe when racing those
operations.
While at it, drop / update comments.
v2: Fix the inverted test on kernfs_should_drain_open_files() noted by
Chengming. This was fixed by the next unrelated patch in the previous
posting.
Cc: Chengming Zhou <[email protected]>
Tested-by: Chengming Zhou <[email protected]>
Reviewed-by: Chengming Zhou <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions