Skip to content

Commit

Permalink
rgw_file: RGWFileHandle dtor must also cond-unlink from FHCache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mattbenjamin committed Mar 1, 2017
1 parent 2bcd9d7 commit 081085e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rgw/rgw_file.cc
Expand Up @@ -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
Expand Down

0 comments on commit 081085e

Please sign in to comment.