diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc index dc01a91c38c..563e798adeb 100644 --- a/src/rgw/librgw.cc +++ b/src/rgw/librgw.cc @@ -119,6 +119,7 @@ namespace rgw { RGWLibFS* fs = iter->first->ref(); uniq.unlock(); fs->gc(); + fs->update_user(); fs->rele(); uniq.lock(); if (cur_gen != gen) diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index 8702b0060dc..4afc5752808 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -1237,6 +1237,13 @@ namespace rgw { RGWUserInfo* get_user() { return &user; } + void update_user() { + RGWUserInfo _user = user; + int ret = rgw_get_user_info_by_access_key(rgwlib.get_store(), key.id, user); + if (ret != 0) + user = _user; + } + void close(); void gc(); }; /* RGWLibFS */