summaryrefslogtreecommitdiff
path: root/src/osd/ReplicatedPG.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/ReplicatedPG.cc')
-rw-r--r--src/osd/ReplicatedPG.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 761a77cd69c..e050eb3d8ee 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -4383,6 +4383,11 @@ int ReplicatedPG::find_object_context(const hobject_t& oid,
if (oid.snap == CEPH_SNAPDIR) {
// return head or snapdir, whichever exists.
ObjectContext *obc = get_object_context(head, oloc, can_create);
+ if (obc && !obc->obs.exists) {
+ // ignore it if the obc exists but the object doesn't
+ put_object_context(obc);
+ obc = NULL;
+ }
if (!obc) {
obc = get_object_context(snapdir, oloc, can_create);
}