Merge pull request #13590 from linuxbox2/wip-badbuck

rgw_file: avoid stranding invalid-name bucket handles in fhcache
This commit is contained in:
Matt Benjamin 2017-02-22 16:35:19 -05:00 committed by GitHub
commit 98b28d675d

View File

@ -437,6 +437,8 @@ namespace rgw {
rc = valid_s3_bucket_name(bname, false /* relaxed */);
if (rc != 0) {
rgw_fh->flags |= RGWFileHandle::FLAG_DELETED;
fh_cache.remove(rgw_fh->fh.fh_hk.object, rgw_fh,
RGWFileHandle::FHCache::FLAG_LOCK);
rgw_fh->mtx.unlock();
unref(rgw_fh);
get<0>(mkr) = nullptr;