]> git.ipfire.org Git - thirdparty/linux.git/commit
hypfs: don't pin dentries twice
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 May 2024 20:00:48 +0000 (16:00 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 18 Nov 2025 04:59:27 +0000 (23:59 -0500)
commit781716cd4a927a6df09f78106f192cdb30560552
tree1628445dda5c0cc3195b92c971fbc5e3ea66798a
parent57db9d428ba5008ca7d664463d7ee1d486b86976
hypfs: don't pin dentries twice

hypfs dentries end up with refcount 2 when they are not busy.
Refcount 1 is enough to keep them pinned, and going that way
allows to simplify things nicely:
* don't need to drop an extra reference before the
call of kill_litter_super() in ->kill_sb(); all we need
there is to reset the cleanup list - everything on it will
be taken out automatically.
* we can make use of simple_recursive_removal() on
tree rebuilds; just make sure that only children of root
end up in the cleanup list and hypfs_delete_tree() becomes
much simpler

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/s390/hypfs/inode.c