Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pkg/sentry/fsimpl/gofer/lisafs_inode.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,13 +704,11 @@ func doRevalidationLisafs(ctx context.Context, vfsObj *vfs.VirtualFilesystem, st
for i := 0; i < len(state.dentries); i++ {
d := state.dentries[i]
found := i < len(stats)
// Advance lastUnlockedDentry. It is the responsibility of this for loop
// block to unlock i.metadataMu.
lastUnlockedDentry = i

// Note that synthetic dentries will always fail this comparison check.
if !found || d.inode.inoKey != inoKeyFromStatx(&stats[i]) {
d.inode.metadataMu.Unlock()
lastUnlockedDentry = i
if !found && d.inode.isSynthetic() {
// We have a synthetic file, and no remote file has arisen to replace
// it.
Expand All @@ -732,6 +730,7 @@ func doRevalidationLisafs(ctx context.Context, vfsObj *vfs.VirtualFilesystem, st
// The file at this path hasn't changed. Just update cached metadata.
d.inode.impl.(*lisafsInode).updateMetadataFromStatxLocked(&stats[i]) // +checklocksforce: see above.
d.inode.metadataMu.Unlock()
lastUnlockedDentry = i
}
return nil
}
Loading