]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: replace raw fs->fh_lru.unref with predefined fs->unref 15541/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Tue, 6 Jun 2017 16:02:43 +0000 (00:02 +0800)
committerGui Hecheng <guihecheng@cmss.chinamobile.com>
Wed, 7 Jun 2017 06:03:05 +0000 (14:03 +0800)
Cleanup for conciseness, also removes a ref on root_fh which does nothing.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
src/rgw/rgw_file.cc
src/rgw/rgw_file.h

index c472e41159b031687a7f4b5fa416d98bf556d8ca..1e28f3307d7d499adedee0a4d893dfe9674bce99 100644 (file)
@@ -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);
     }
   }
 
index eb3fcf2fc8a0e215d98f68423d2ba9c0330feda0..b7a20ef4d6614c9625f54295778f7e37e416c2b0 100644 (file)
@@ -1133,7 +1133,6 @@ namespace rgw {
       if (! fh) {
        if (unlikely(fh_hk == root_fh.fh.fh_hk)) {
          fh = &root_fh;
-         ref(fh);
        }
       }