Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent recreating dir nodes in readdir
The readdir implementation would generate new nodes for every directory it encountered, even if they had seen before, returning new inodes each time. Other than this having a performance impact, this is just incorrect and I'm not sure how this bug has survived for so long. In fact, the only reason I noticed this is because I tried to build GNU tar on top of sandboxfs and its configure script would fail when run as root. Essentially, the test was doing a rename of a directory inside a directory, and that somehow caused the pwd to become invalid when performing a readdir on the parent directory. The issue is easier to reproduce on Linux though. Fixes #92.
- Loading branch information
Showing
3 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters