rgw: fix chained cache put if cache isn't initialized

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
Yehuda Sadeh 2018-10-16 07:17:34 -07:00
parent 50e5c08958
commit b6cfb3f34d

View File

@ -138,6 +138,10 @@ public:
bool put(RGWSI_SysObj_Cache *svc, const string& key, T *entry,
std::initializer_list<rgw_cache_entry_info *> cache_info_entries) {
if (!svc) {
return false;
}
Entry chain_entry(this, key, entry);
/* we need the svc cache to call us under its lock to maintain lock ordering */