From: Sage Weil Date: Mon, 4 Mar 2013 23:45:51 +0000 (-0800) Subject: client: make _do_lookup take a const string X-Git-Tag: v0.60~121^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d501f6121f7240a82cd8ab4b97930e0767453ae;p=ceph.git client: make _do_lookup take a const string Signed-off-by: Sage Weil --- diff --git a/src/client/Client.cc b/src/client/Client.cc index c57b7131fdcd..9f8ba4accbcd 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3829,7 +3829,7 @@ void Client::renew_caps(const int mds) { // =============================================================== // high level (POSIXy) interface -int Client::_do_lookup(Inode *dir, const char *name, Inode **target) +int Client::_do_lookup(Inode *dir, const string& name, Inode **target) { int op = dir->snapid == CEPH_SNAPDIR ? CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_LOOKUP; MetaRequest *req = new MetaRequest(op); @@ -3839,10 +3839,10 @@ int Client::_do_lookup(Inode *dir, const char *name, Inode **target) req->set_filepath(path); req->inode = dir; req->head.args.getattr.mask = 0; - ldout(cct, 10) << "_lookup on " << path << dendl; + ldout(cct, 10) << "_do_lookup on " << path << dendl; int r = make_request(req, 0, 0, target); - ldout(cct, 10) << "_lookup res is " << r << dendl; + ldout(cct, 10) << "_do_lookup res is " << r << dendl; return r; } @@ -3921,7 +3921,7 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target) } } - r = _do_lookup(dir, dname.c_str(), target); + r = _do_lookup(dir, dname, target); done: if (r < 0) diff --git a/src/client/Client.h b/src/client/Client.h index ba6bb7c4a5fa..7c404c214da5 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -521,7 +521,7 @@ private: // internal interface // call these with client_lock held! - int _do_lookup(Inode *dir, const char *name, Inode **target); + int _do_lookup(Inode *dir, const string& name, Inode **target); int _lookup(Inode *dir, const string& dname, Inode **target); int _link(Inode *in, Inode *dir, const char *name, int uid=-1, int gid=-1, Inode **inp = 0);