Commit ee4f4770 authored by Aaron Jacobs's avatar Aaron Jacobs

Fixed some out of date lock annotations.

parent 560105ca
......@@ -37,7 +37,7 @@ type inode struct {
// INVARIANT: attrs.Mode &^ (os.ModePerm|os.ModeDir|os.ModeSymlink) == 0
// INVARIANT: !(isDir() && isSymlink())
// INVARIANT: attrs.Size == len(contents)
attrs fuseops.InodeAttributes // GUARDED_BY(mu)
attrs fuseops.InodeAttributes
// For directories, entries describing the children of the directory. Unused
// entries are of type DT_Unknown.
......@@ -50,18 +50,16 @@ type inode struct {
// INVARIANT: If !isDir(), len(entries) == 0
// INVARIANT: For each i, entries[i].Offset == i+1
// INVARIANT: Contains no duplicate names in used entries.
entries []fuseutil.Dirent // GUARDED_BY(mu)
entries []fuseutil.Dirent
// For files, the current contents of the file.
//
// INVARIANT: If !isFile(), len(contents) == 0
contents []byte // GUARDED_BY(mu)
contents []byte
// For symlinks, the target of the symlink.
//
// INVARIANT: If !isSymlink(), len(target) == 0
//
// GUARDED_BY(mu)
target string
}
......
......@@ -45,6 +45,8 @@ type memFS struct {
// be re-used have nil entries. No ID less than fuseops.RootInodeID is ever
// used.
//
// All inodes are protected by the file system mutex.
//
// INVARIANT: For each inode in, in.CheckInvariants() does not panic.
// INVARIANT: len(inodes) > fuseops.RootInodeID
// INVARIANT: For all i < fuseops.RootInodeID, inodes[i] == nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment