Skip to content

Commit

Permalink
Merge pull request #13712 from linuxbox2/wip-dtor-fhcache
Browse files Browse the repository at this point in the history
rgw_file: RGWFileHandle dtor must also cond-unlink from FHCache
  • Loading branch information
mattbenjamin committed Mar 4, 2017
2 parents 60bb2a8 + d51a3b1 commit e180639
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 e180639

Please sign in to comment.