Messiness in removing directories
Messiness in removing directories
Posted Jun 17, 2018 2:18 UTC (Sun) by ebiederm (subscriber, #35028)In reply to: Messiness in removing directories by nix
Parent article: Messiness in removing directories
The code was changed to do umount -l of anything mounted on the removed directory. However the generic code assumed the directory was empty and so did not umount -l of any files or directories in the removed directory, assuming removed directories
were always empty.
d_invalidate handles the recursive umount -l properly, and is how filesystems like proc with a revalidate handler ultimately
get the job done.
It sounds like there is just a case of some special filesystems that need to call d_invalidate to trigger the unmount instead of leaking things.