Remove unnecessary label bucket loop
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
This commit is contained in:
parent
96de54db43
commit
1fb835f042
@ -719,16 +719,9 @@ func isSharedContent(tx *bolt.Tx, dgst digest.Digest) bool {
|
||||
if lbkt == nil {
|
||||
continue
|
||||
}
|
||||
// iterate through each label
|
||||
lbc := lbkt.Cursor()
|
||||
for k, v := lbc.First(); k != nil; k, v = lbc.Next() {
|
||||
if string(k) == labels.LabelSharedNamespace {
|
||||
if string(v) == "true" && getBlobBucket(tx, ns, dgst) != nil {
|
||||
if sharedNS := lbkt.Get([]byte(labels.LabelSharedNamespace)); sharedNS != nil && string(sharedNS) == "true" && getBlobBucket(tx, ns, dgst) != nil {
|
||||
return true
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user