diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-08-31 09:43:43 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-09-04 22:33:51 +0200 |
commit | b0841eefd9693827afb9888235e26ddd098f9cef (patch) | |
tree | 9e420e0e963aada121fb41ed76a2177594fc73bf /certs/system_keyring.c | |
parent | configfs: new object reprsenting tree fragments (diff) | |
download | linux-b0841eefd9693827afb9888235e26ddd098f9cef.tar.xz linux-b0841eefd9693827afb9888235e26ddd098f9cef.zip |
configfs: provide exclusion between IO and removals
Make sure that attribute methods are not called after the item
has been removed from the tree. To do so, we
* at the point of no return in removals, grab ->frag_sem
exclusive and mark the fragment dead.
* call the methods of attributes with ->frag_sem taken
shared and only after having verified that the fragment is still
alive.
The main benefit is for method instances - they are
guaranteed that the objects they are accessing *and* all ancestors
are still there. Another win is that we don't need to bother
with extra refcount on config_item when opening a file -
the item will be alive for as long as it stays in the tree, and
we won't touch it/attributes/any associated data after it's
been removed from the tree.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'certs/system_keyring.c')
0 files changed, 0 insertions, 0 deletions