From: Patrick Donnelly Date: Tue, 16 Jul 2019 13:52:23 +0000 (-0700) Subject: client: do not return EEXIST for mkdirs X-Git-Tag: v14.2.3~168^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2bc3a8bac9428f4bd94d72674efd8d50aebf3325;p=ceph.git client: do not return EEXIST for mkdirs Behavior should be similar to `mkdir -p`. Introduced-by: 26905ca82776e8119a347a9a2e8d65c272c7ed62 Signed-off-by: Patrick Donnelly (cherry picked from commit b049eb9bbcdaef547c3559e9dbe5a3ca272f60ec) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 5f5e04446677f..0e79823c5980a 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -6652,8 +6652,6 @@ int Client::mkdirs(const char *relpath, mode_t mode, const UserPerm& perms) break; cur.swap(next); } - //check that we have work left to do - if (i==path.depth()) return -EEXIST; if (r!=-ENOENT) return r; ldout(cct, 20) << __func__ << " got through " << i << " directories on path " << relpath << dendl; //make new directory at each level