summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_file.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@users.noreply.github.com>2018-04-12 17:14:05 +0200
committerGitHub <noreply@github.com>2018-04-12 17:14:05 +0200
commit68ff1f19d94a8ac69eeae435df1007fd82709337 (patch)
tree86a3fb5a650a18db0b4ed4bd93a3e27c5b9b2c7e /src/rgw/rgw_file.cc
parentMerge pull request #20926 from yehudasa/wip-22963-truncation (diff)
parentrgw_file: conditionally unlink handles when direct deleted (diff)
downloadceph-68ff1f19d94a8ac69eeae435df1007fd82709337.tar.xz
ceph-68ff1f19d94a8ac69eeae435df1007fd82709337.zip
Merge pull request #20834 from linuxbox2/wip-linked
rgw_file: conditionally unlink handles when direct deleted Reviewed-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_file.cc')
-rw-r--r--src/rgw/rgw_file.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc
index 90ac01f75bb..2e09d4a8f80 100644
--- a/src/rgw/rgw_file.cc
+++ b/src/rgw/rgw_file.cc
@@ -951,6 +951,11 @@ namespace rgw {
}
RGWFileHandle::~RGWFileHandle() {
+ /* !recycle case, handle may STILL be in handle table, BUT
+ * the partition lock is not held in this path */
+ if (fh_hook.is_linked()) {
+ fs->fh_cache.remove(fh.fh_hk.object, this, FHCache::FLAG_LOCK);
+ }
/* cond-unref parent */
if (parent && (! parent->is_mount())) {
/* safe because if parent->unref causes its deletion,