summaryrefslogtreecommitdiffstats
path: root/certs/system_keyring.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-08-31 09:43:43 +0200
committerChristoph Hellwig <hch@lst.de>2019-09-04 22:33:51 +0200
commitb0841eefd9693827afb9888235e26ddd098f9cef (patch)
tree9e420e0e963aada121fb41ed76a2177594fc73bf /certs/system_keyring.c
parentconfigfs: new object reprsenting tree fragments (diff)
downloadlinux-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