BFS directory corruption when directory removes itself
|Reported by:||mmlr||Owned by:||axeld|
|Has a Patch:||no||Platform:||All|
When doing a "rmdir ." from an empty directory, BFS will use the directory inode "." to remove the entry ".". This will set the node to deleted, but it doesn't remove the node from the parent directory. Opening the parent directory will then fail with "inode already deleted".
Steps to reproduce:
mkdir -p test1/test2 cd test1/test2 rmdir . cd .. ls
The ls will fail, corresponding messages are printed to the syslog. Such a directory cannot be deleted anymore.
I think in case someone tries to remove "." this has to be resolved to the entry in the parent directory instead and the parent directory has to do the removal.