]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: do not return EEXIST for mkdirs 28003/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 16 Jul 2019 13:52:23 +0000 (06:52 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 16 Jul 2019 13:52:23 +0000 (06:52 -0700)
Behavior should be similar to `mkdir -p`.

Introduced-by: 26905ca82776e8119a347a9a2e8d65c272c7ed62
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/client/Client.cc

index a1b2bfee15f2ee1181d24205d0c6134a216824d4..bc1914ac994189e8cb06765ca99852f2b2b93824 100644 (file)
@@ -6655,8 +6655,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