]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: use fh_hook::is_linked() to check residence 13703/head
authorMatt Benjamin <mbenjamin@redhat.com>
Tue, 28 Feb 2017 20:49:06 +0000 (15:49 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 28 Feb 2017 20:56:40 +0000 (15:56 -0500)
Previously we assumed that !deleted handles were resident--there
is an observed case where a !deleted handle is !linked.  Since
we currently use safe_link mode, an is_linked() check is
available, and exhaustive.

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

index dbe1ad657a2cfd9e68006b98cc29268f5f952952..296899f07d850147bf5da2d52f896cb0daf61198 100644 (file)
@@ -813,8 +813,8 @@ namespace rgw {
     lsubdout(fs->get_context(), rgw, 17)
       << __func__ << " " << *this
       << dendl;
-    /* if !deleted, then object still in fh_cache */
-    if (! deleted()) {
+    /* remove if still in fh_cache */
+    if (fh_hook.is_linked()) {
       fs->fh_cache.remove(fh.fh_hk.object, this, FHCache::FLAG_LOCK);
     }
     return true;