diff --git a/objectstore/RootEntry.cpp b/objectstore/RootEntry.cpp index 72f20fdcb667aa91da4eecedee46576ba92f4e0f..f743cb45b302c76974a36cfa9cbbf7351bb2ff95 100644 --- a/objectstore/RootEntry.cpp +++ b/objectstore/RootEntry.cpp @@ -424,6 +424,7 @@ std::string cta::objectstore::RootEntry::addOrGetTapePoolAndCommit(const std::st // Insert the tape pool, then its pointer, with agent intent log update // First generate the intent. We expect the agent to be passed locked. std::string tapePoolAddress = agent.nextId("tapePool"); + ScopedExclusiveLock agl(agent); agent.fetch(); agent.addToOwnership(tapePoolAddress); agent.commit();