]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
uClient: _rename doesn't remove nodes from cache.
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 4 Aug 2009 19:43:34 +0000 (12:43 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 4 Aug 2009 19:43:34 +0000 (12:43 -0700)
Sage says this is unnecessary.

src/client/Client.cc

index dcc4ff97fb63ac8176fee6ecd47b1932473341be..41e5f748e38c209f74ff8cf10d55fbc0dd1d2d8f 100644 (file)
@@ -4967,13 +4967,7 @@ int Client::_rename(Inode *fromdir, const char *fromname, Inode *todir, const ch
   req->set_filepath2(from);
  
   int res = make_request(req, uid, gid);
-  if (res == 0) {
-    // remove from local cache
-    if (fromdir->dir->dentries.count(fromname)) {
-      Dentry *dn = fromdir->dir->dentries[fromname];
-      unlink(dn);
-    }
-  }
+
   dout(10) << "rename result is " << res << dendl;
 
   // renamed item from our cache