diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-02 15:37:28 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-02 15:37:28 +0000 |
commit | 3a4167ae23b84d97d14d773a2dd6a37d69c59b59 (patch) | |
tree | 68798a01b382be9447f7b1ceb10afa53a11c3b0d | |
parent | Fix EntCache locking (diff) | |
download | netfs-3a4167ae23b84d97d14d773a2dd6a37d69c59b59.tar.bz2 netfs-3a4167ae23b84d97d14d773a2dd6a37d69c59b59.tar.xz netfs-3a4167ae23b84d97d14d773a2dd6a37d69c59b59.zip |
Fix locking in FuseApp around volume and service proxies
-rw-r--r-- | netfs/fuse/fuseApp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp index 78a3a03..734bf91 100644 --- a/netfs/fuse/fuseApp.cpp +++ b/netfs/fuse/fuseApp.cpp @@ -137,8 +137,8 @@ NetFS::FuseApp::opt_parse(void * data, const char * arg, int, struct fuse_args * void NetFS::FuseApp::connectSession() { + Lock(_lock); if (!sessionOpened && ic->getDefaultRouter()) { - Lock(_lock); auto router = Ice::checkedCast<Glacier2::RouterPrx>(ic->getDefaultRouter()); session = router->createSession("", ""); if (int acmTimeout = router->getACMTimeout() > 0) { @@ -152,8 +152,8 @@ NetFS::FuseApp::connectSession() void NetFS::FuseApp::connectToService() { + Lock(_lock); if (!service) { - Lock(_lock); auto proxyAddr = fcr->ServiceIdentity; for (const auto & ep : fcr->Endpoints) { proxyAddr += ":" + ep; @@ -168,8 +168,8 @@ NetFS::FuseApp::connectToService() void NetFS::FuseApp::connectToVolume() { + Lock(_lock); if (!volume) { - Lock(_lock); volume = service->connect(fcr->ExportName, fcr->AuthToken); if (!volume) { throw std::runtime_error("Invalid filesystem proxy"); |