For vfs.FileDescriptions for which FileDescriptionOptions.UseDentryMetadata is
true, memmap.MappingIdentity.Device/InodeID() => FileDescription.Stat() =>
FilesystemImpl.StatAt() takes fsimpl locks for path traversal, which violates
the lock ordering and is unnecessary since no path is being traversed. Fix this
by carving out a special case where FilesystemImpl.Stat() (and
FileDescriptionImpl.Stat()) are required to meet the lock ordering requirements
of memmap.MappingIdentity.Device/InodeID(), and implement that special case by
skipping path traversal (and gofer revalidation) locks when not required.
Fix memmap.MappingIdentity.Device/InodeID() lock ordering.
For vfs.FileDescriptions for which FileDescriptionOptions.UseDentryMetadata is true, memmap.MappingIdentity.Device/InodeID() => FileDescription.Stat() => FilesystemImpl.StatAt() takes fsimpl locks for path traversal, which violates the lock ordering and is unnecessary since no path is being traversed. Fix this by carving out a special case where FilesystemImpl.Stat() (and FileDescriptionImpl.Stat()) are required to meet the lock ordering requirements of memmap.MappingIdentity.Device/InodeID(), and implement that special case by skipping path traversal (and gofer revalidation) locks when not required.