overlay: remove unreachable code

the removed code is not reachable since permsKnown must be true to be
in this code branch.

Closes: https://github.com/containers/storage/issues/1900

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2024-05-30 22:05:49 +02:00
parent 989e69d83a
commit 0c883a5eeb
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
1 changed files with 1 additions and 5 deletions

View File

@ -1539,11 +1539,7 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
for err == nil {
absLowers = append(absLowers, filepath.Join(dir, nameWithSuffix("diff", diffN)))
diffN++
st, err = os.Stat(filepath.Join(dir, nameWithSuffix("diff", diffN)))
if err == nil && !permsKnown {
perms = os.FileMode(st.Mode())
permsKnown = true
}
err = fileutils.Exists(filepath.Join(dir, nameWithSuffix("diff", diffN)))
}
idmappedMountProcessPid := -1