func (fs *memFS) ReadSymlink( op *fuseops.ReadSymlinkOp) (err error) { fs.mu.Lock() defer fs.mu.Unlock() // Find the inode in question. inode := fs.getInodeOrDie(op.Inode) // Serve the request. op.Target = inode.target return }
// LOCKS_EXCLUDED(fs.mu) func (fs *fileSystem) ReadSymlink( op *fuseops.ReadSymlinkOp) (err error) { // Find the inode. fs.mu.Lock() in := fs.inodes[op.Inode].(*inode.SymlinkInode) fs.mu.Unlock() in.Lock() defer in.Unlock() // Serve the request. op.Target = in.Target() return }