mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
librgw: avoid illegal rele()
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
parent
ec89aafd2f
commit
9429cb13f9
@ -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);
|
||||
|
||||
|
@ -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 */);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user