diff --git a/samples/statfs/statfs.go b/samples/statfs/statfs.go index 36b6264..d80ac24 100644 --- a/samples/statfs/statfs.go +++ b/samples/statfs/statfs.go @@ -103,19 +103,14 @@ func (fs *statFS) MostRecentWriteSize() int { // FileSystem methods //////////////////////////////////////////////////////////////////////// -func (fs *statFS) LookUpInode( +// LOCKS_EXCLUDED(fs.mu) +func (fs *statFS) StatFS( ctx context.Context, - op *fuseops.LookUpInodeOp) (err error) { - // Pretend that every name exists as a child of the root inode, and is a - // file. - if op.Parent != fuseops.RootInodeID { - err = fuse.ENOENT - return - } - - op.Entry.Child = childInodeID - op.Entry.Attributes = fileAttrs() + op *fuseops.StatFSOp) (err error) { + fs.mu.Lock() + defer fs.mu.Unlock() + *op = fs.cannedResponse return }