if (res == 0) {
if (dir->dir && dir->dir->dentries.count(name)) {
Dentry *dn = dir->dir->dentries[name];
- if (dn)
- unlink(dn);
+ unlink(dn);
}
}
delete reply;
if (res == 0) {
if (dir->dir && dir->dir->dentries.count(name) ) {
Dentry *dn = dir->dir->dentries[name];
- if (dn) {
- if (dn->inode->dir && dn->inode->dir->is_empty())
- close_dir(dn->inode->dir); // FIXME: maybe i shoudl proactively hose the whole subtree from cache?
- unlink(dn);
- }
+ if (dn->inode->dir && dn->inode->dir->is_empty())
+ close_dir(dn->inode->dir); // FIXME: maybe i shoudl proactively hose the whole subtree from cache?
+ unlink(dn);
}
}
delete reply;
int res = reply->get_result();
if (res == 0) {
// remove from local cache
- if(fromdir->dir->dentries.count(fromname) )
+ if (fromdir->dir->dentries.count(fromname)) {
Dentry *dn = fromdir->dir->dentries[fromname];
- if (dn)
unlink(dn);
+ }
}
delete reply;
dout(10) << "rename result is " << res << dendl;