mirror of
https://github.com/ceph/ceph
synced 2024-12-16 16:39:21 +00:00
Merge PR #17205 into master
* refs/remotes/upstream/pull/17205/head: client: fix locking in Client::getcwd Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
270f1edaae
@ -9380,11 +9380,11 @@ int Client::chdir(const char *relpath, std::string &new_cwd,
|
||||
cwd.swap(in);
|
||||
ldout(cct, 3) << "chdir(" << relpath << ") cwd now " << cwd->ino << dendl;
|
||||
|
||||
getcwd(new_cwd, perms);
|
||||
_getcwd(new_cwd, perms);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Client::getcwd(string& dir, const UserPerm& perms)
|
||||
void Client::_getcwd(string& dir, const UserPerm& perms)
|
||||
{
|
||||
filepath path;
|
||||
ldout(cct, 10) << "getcwd " << *cwd << dendl;
|
||||
@ -9424,6 +9424,12 @@ void Client::getcwd(string& dir, const UserPerm& perms)
|
||||
dir += path.get_path();
|
||||
}
|
||||
|
||||
void Client::getcwd(string& dir, const UserPerm& perms)
|
||||
{
|
||||
Mutex::Locker l(client_lock);
|
||||
_getcwd(dir, perms);
|
||||
}
|
||||
|
||||
int Client::statfs(const char *path, struct statvfs *stbuf,
|
||||
const UserPerm& perms)
|
||||
{
|
||||
|
@ -956,6 +956,7 @@ public:
|
||||
|
||||
// crap
|
||||
int chdir(const char *s, std::string &new_cwd, const UserPerm& perms);
|
||||
void _getcwd(std::string& cwd, const UserPerm& perms);
|
||||
void getcwd(std::string& cwd, const UserPerm& perms);
|
||||
|
||||
// namespace ops
|
||||
|
Loading…
Reference in New Issue
Block a user