-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid access to Forgotten() before initialized
Our `Lookup()` implementation returns a newly created `*fusefs.Inode` to go-fuse. Then that `*fusefs.Inode` is configured and managed by go-fuse lib. Though [`*fusefs.Inode.Forgotten()`](https://github.com/hanwen/go-fuse/blob/e9e7c22af17af4611b5783a16458647088cc8dec/fs/inode.go#L258) allows status check of that object, it shouldn't be called until that `*fusefs.Inode` is [fully configured by go-fuse](https://github.com/hanwen/go-fuse/blob/e9e7c22af17af4611b5783a16458647088cc8dec/fs/bridge.go#L209-L210). To avoid this race, this commit adds a lock for avoiding calling Forgotten API during configuration on-going in go-fuse. Signed-off-by: Kohei Tokunaga <[email protected]>
- Loading branch information
Showing
1 changed file
with
52 additions
and
14 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