]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: use fh_hook::is_linked() to check residence
authorMatt Benjamin <mbenjamin@redhat.com>
Tue, 28 Feb 2017 20:49:06 +0000 (15:49 -0500)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 Jul 2017 07:15:41 +0000 (09:15 +0200)
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>
(cherry picked from commit c0aa515f8d8c57ec5ee09e3b60df3cac60453c40)

src/rgw/rgw_file.cc

index 96f021e616d8f912df9eb00bf02ef41d51d4a7ed..d18e75c7d31b8a4b9e16156865523dd620f03403 100644 (file)
@@ -805,8 +805,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;