]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: do not return EEXIST for mkdirs 29079/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 16 Jul 2019 13:52:23 +0000 (06:52 -0700)
committerRamana Raja <rraja@redhat.com>
Wed, 17 Jul 2019 10:07:37 +0000 (15:37 +0530)
Behavior should be similar to `mkdir -p`.

Introduced-by: 26905ca82776e8119a347a9a2e8d65c272c7ed62
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b049eb9bbcdaef547c3559e9dbe5a3ca272f60ec)

src/client/Client.cc

index 5f5e04446677fe008e92b75b87218cba843fadde..0e79823c5980a988d3fef4bd259cd92ae6e887fd 100644 (file)
@@ -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