]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: RGWFileHandle dtor must also cond-unlink from FHCache 13712/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 1 Mar 2017 01:24:12 +0000 (20:24 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 3 Mar 2017 15:55:20 +0000 (10:55 -0500)
Formerly masked in part by the reclaim() action, direct-delete now
substitutes for reclaim() iff its LRU lane is over its high-water
mark, and in particular, like reclaim() the destructor is certain
to see handles still interned on the FHcache when nfs-ganesha is
recycling objects from its own LRU.

Fixes: http://tracker.ceph.com/issues/19112
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc

index 296899f07d850147bf5da2d52f896cb0daf61198..376a317798b1c7d3167e9f4b3f521a282a0a837e 100644 (file)
@@ -777,6 +777,11 @@ namespace rgw {
   }
 
   RGWFileHandle::~RGWFileHandle() {
+    /* in the non-delete case, handle may still be in handle table */
+    if (fh_hook.is_linked()) {
+      fs->fh_cache.remove(fh.fh_hk.object, this, FHCache::FLAG_LOCK);
+    }
+    /* cond-unref parent */
     if (parent && (! parent->is_root())) {
       /* safe because if parent->unref causes its deletion,
        * there are a) by refcnt, no other objects/paths pointing