if (_search_item_exists(item)) {
return false;
}
- if (item < 0 && _bucket_is_in_use(cct, item)) {
+ if (item < 0 && _bucket_is_in_use(item)) {
return false;
}
<< " items, not empty" << dendl;
return -ENOTEMPTY;
}
- if (_bucket_is_in_use(cct, item)) {
+ if (_bucket_is_in_use(item)) {
return -EBUSY;
}
}
return false;
}
-bool CrushWrapper::_bucket_is_in_use(CephContext *cct, int item)
+bool CrushWrapper::_bucket_is_in_use(int item)
{
for (unsigned i = 0; i < crush->max_rules; ++i) {
crush_rule *r = crush->rules[i];
ldout(cct, 5) << "remove_item_under " << item << " under " << ancestor
<< (unlink_only ? " unlink_only":"") << dendl;
- if (!unlink_only && _bucket_is_in_use(cct, item)) {
+ if (!unlink_only && _bucket_is_in_use(item)) {
return -EBUSY;
}
private:
bool _maybe_remove_last_instance(CephContext *cct, int id, bool unlink_only);
int _remove_item_under(CephContext *cct, int id, int ancestor, bool unlink_only);
- bool _bucket_is_in_use(CephContext *cct, int id);
+ bool _bucket_is_in_use(int id);
public:
int remove_item_under(CephContext *cct, int id, int ancestor, bool unlink_only);