From: Sage Weil Date: Thu, 16 May 2013 20:49:58 +0000 (-0700) Subject: client: do not manually clean up on unlink/rmdir X-Git-Tag: v0.81~19^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=627e644c35a93413e36879ff40fec5836d891885;p=ceph.git client: do not manually clean up on unlink/rmdir The reply handler will do this in a safe, ordered fashion. Signed-off-by: Sage Weil --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 300ba1126bf3..535752ad33d7 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -7956,13 +7956,6 @@ int Client::_unlink(Inode *dir, const char *name, int uid, int gid) req->set_inode(dir); res = make_request(req, uid, gid); - if (res == 0) { - if (dir->dir && dir->dir->dentries.count(name)) { - Dentry *dn = dir->dir->dentries[name]; - unlink(dn, false, false); - } - } - ldout(cct, 10) << "unlink result is " << res << dendl; trim_cache(); ldout(cct, 3) << "unlink(" << path << ") = " << res << dendl; @@ -8018,15 +8011,6 @@ int Client::_rmdir(Inode *dir, const char *name, int uid, int gid) req->set_inode(in); res = make_request(req, uid, gid); - if (res == 0) { - if (dir->dir && dir->dir->dentries.count(name) ) { - Dentry *dn = dir->dir->dentries[name]; - if (dn->inode->dir && dn->inode->dir->is_empty() && - (dn->inode->dn_set.size() == 1)) - close_dir(dn->inode->dir); // FIXME: maybe i shoudl proactively hose the whole subtree from cache? - unlink(dn, false, false); - } - } trim_cache(); ldout(cct, 3) << "rmdir(" << path << ") = " << res << dendl;