diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 0d00b087628..c14e518c4e8 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10023,15 +10023,11 @@ SnapSetContext *PrimaryLogPG::get_snapset_context( bufferlist bv; if (!attrs) { int r = -ENOENT; - if (!(oid.is_head() && !oid_existed)) + if (!(oid.is_head() && !oid_existed)) { r = pgbackend->objects_get_attr(oid.get_head(), SS_ATTR, &bv); - if (r < 0) { - // try _snapset - if (!(oid.is_snapdir() && !oid_existed)) - r = pgbackend->objects_get_attr(oid.get_snapdir(), SS_ATTR, &bv); - if (r < 0 && !can_create) - return NULL; } + if (r < 0 && !can_create) + return NULL; } else { assert(attrs->count(SS_ATTR)); bv = attrs->find(SS_ATTR)->second;