From: Gui Hecheng Date: Tue, 6 Jun 2017 16:02:43 +0000 (+0800) Subject: rgw_file: replace raw fs->fh_lru.unref with predefined fs->unref X-Git-Tag: v12.1.0~197^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcd313e3d6975d91c1ce033c6a00ce23b786d0cd;p=ceph.git rgw_file: replace raw fs->fh_lru.unref with predefined fs->unref Cleanup for conciseness, also removes a ref on root_fh which does nothing. Signed-off-by: Gui Hecheng --- diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index c472e41159b0..1e28f3307d7d 100644 --- a/src/rgw/rgw_file.cc +++ b/src/rgw/rgw_file.cc @@ -760,7 +760,7 @@ namespace rgw { << fh->name << " before ObjUnref refs=" << fh->get_refcnt() << dendl; - fs->fh_lru.unref(fh, cohort::lru::FLAG_NONE); + fs->unref(fh); } }; @@ -932,7 +932,7 @@ namespace rgw { * no unsafe iterators reaching it either--n.b., this constraint * is binding oncode which may in future attempt to e.g., * cause the eviction of objects in LRU order */ - (void) get_fs()->fh_lru.unref(parent, cohort::lru::FLAG_NONE); + (void) get_fs()->unref(parent); } } diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index eb3fcf2fc8a0..b7a20ef4d661 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -1133,7 +1133,6 @@ namespace rgw { if (! fh) { if (unlikely(fh_hk == root_fh.fh.fh_hk)) { fh = &root_fh; - ref(fh); } }