From 85478ea1112819fd80c1d2a17d20f316a466c56d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 29 Jun 2019 14:30:16 +0800 Subject: [PATCH] osd/PrimaryLogPG: more constness use `hobject_t::get_head()` instead of relying on the fact that head object's snap is `CEPH_NOSNAP`. Signed-off-by: Kefu Chai --- src/osd/PrimaryLogPG.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 093cb3bce3f..6e9ef361a6e 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -1767,8 +1767,7 @@ void PrimaryLogPG::do_op(OpRequestRef& op) dout(20) << __func__ << ": op " << *m << dendl; - hobject_t head = m->get_hobj(); - head.snap = CEPH_NOSNAP; + const hobject_t head = m->get_hobj().get_head(); if (!info.pgid.pgid.contains( info.pgid.pgid.get_split_bits(pool.info.get_pg_num()), head)) { -- 2.39.5