diff --git a/samples/memfs/inode.go b/samples/memfs/inode.go index 998a829..8ec18d4 100644 --- a/samples/memfs/inode.go +++ b/samples/memfs/inode.go @@ -176,7 +176,7 @@ func (in *inode) isFile() bool { // Return the number of children of the directory. // // REQUIRES: in.isDir() -// SHARED_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) Len() (n int) { for _, e := range in.entries { if e.Type != fuseutil.DT_Unknown { @@ -190,7 +190,7 @@ func (in *inode) Len() (n int) { // Find an entry for the given child name and return its inode ID. // // REQUIRES: in.isDir() -// SHARED_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) LookUpChild(name string) (id fuseops.InodeID, ok bool) { index, ok := in.findChild(name) if ok { @@ -204,7 +204,7 @@ func (in *inode) LookUpChild(name string) (id fuseops.InodeID, ok bool) { // // REQUIRES: in.isDir() // REQUIRES: dt != fuseutil.DT_Unknown -// EXCLUSIVE_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) AddChild( id fuseops.InodeID, name string, @@ -244,7 +244,7 @@ func (in *inode) AddChild( // // REQUIRES: in.isDir() // REQUIRES: An entry for the given name exists. -// EXCLUSIVE_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) RemoveChild(name string) { // Update the modification time. in.attributes.Mtime = in.clock.Now() @@ -265,7 +265,7 @@ func (in *inode) RemoveChild(name string) { // Serve a ReadDir request. // // REQUIRES: in.isDir() -// SHARED_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) ReadDir(offset int, size int) (data []byte, err error) { if !in.dir { panic("ReadDir called on non-directory.") @@ -294,7 +294,7 @@ func (in *inode) ReadDir(offset int, size int) (data []byte, err error) { // Read from the file's contents. See documentation for ioutil.ReaderAt. // // REQUIRES: in.isFile() -// SHARED_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) ReadAt(p []byte, off int64) (n int, err error) { if in.dir { panic("ReadAt called on directory.") @@ -318,7 +318,7 @@ func (in *inode) ReadAt(p []byte, off int64) (n int, err error) { // Write to the file's contents. See documentation for ioutil.WriterAt. // // REQUIRES: in.isFile() -// EXCLUSIVE_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) WriteAt(p []byte, off int64) (n int, err error) { if in.dir { panic("WriteAt called on directory.") @@ -348,7 +348,7 @@ func (in *inode) WriteAt(p []byte, off int64) (n int, err error) { // Update attributes from non-nil parameters. // -// EXCLUSIVE_LOCKS_REQUIRED(in.mu) +// LOCKS_REQUIRED(in.mu) func (in *inode) SetAttributes( size *uint64, mode *os.FileMode,