From c294bd34e7e29f2c96e3277491c02ea26bf6da5c Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 20 May 2016 13:59:10 -0700 Subject: [PATCH] ReplicatedPG: adjust num_pinned in _delete_oid Fixes: http://tracker.ceph.com/issues/15952 Signed-off-by: Samuel Just (cherry picked from commit 907d4e25c676fd3e1c2be90ce8ab5b64b362b0bc) --- src/osd/ReplicatedPG.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index e846938610ab..352918c20d88 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5230,6 +5230,9 @@ inline int ReplicatedPG::_delete_oid(OpContext *ctx, bool no_whiteout) dout(20) << __func__ << " deleting whiteout on " << soid << dendl; ctx->delta_stats.num_whiteouts--; } + if (oi.is_cache_pinned()) { + ctx->delta_stats.num_objects_pinned--; + } if (soid.is_head()) snapset.head_exists = false; obs.exists = false; -- 2.47.3