librgw: avoid illegal rele()

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Matt Benjamin 2015-10-26 20:24:26 -04:00
parent ec89aafd2f
commit 9429cb13f9
2 changed files with 4 additions and 5 deletions

View File

@ -271,9 +271,6 @@ int rgw_readdir(struct rgw_fs *rgw_fs,
{
int rc;
/* XXXX remove uri, deal with bucket and object names */
string uri;
RGWLibFS *fs = static_cast<RGWLibFS*>(rgw_fs->fs_private);
CephContext* cct = static_cast<CephContext*>(rgw_fs->rgw);
@ -295,7 +292,8 @@ int rgw_readdir(struct rgw_fs *rgw_fs,
/*
* bucket?
*/
uri += "/";
/* XXXX remove uri, deal with bucket and object names */
string uri = "/" + parent->bucket_name() + "/";
RGWListBucketRequest req(cct, fs->get_user(), uri, rcb, cb_arg, offset);
rc = librgw.get_fe()->execute_req(&req);

View File

@ -132,7 +132,8 @@ TEST(LibRGW, CLEANUP) {
using std::get;
for (auto& fids : { fids1, fids2 }) {
for (auto& fid : fids) {
ret = rgw_fh_rele(fs, get<2>(fid), 0 /* flags */);
/* XXX readdir only looked up their names (atm), don't try to rele() */
//ret = rgw_fh_rele(fs, get<2>(fid), 0 /* flags */);
}
}
}