diff options
-rw-r--r-- | netfs/fuse/fuseApp.h | 4 | ||||
-rw-r--r-- | netfs/fuse/fuseFiles.cpp | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h index b0b0e5a..790f88a 100644 --- a/netfs/fuse/fuseApp.h +++ b/netfs/fuse/fuseApp.h @@ -94,8 +94,8 @@ namespace NetFS { template<typename Handle> void clearProxy(FuseHandleTypeId localID); template<typename Handle> std::map<FuseHandleTypeId, Handle> & getMap(); - template<typename Rtn, typename F> - static inline Rtn waitOnWriteRangeAndThen(size_t s, off_t o, const OpenFilePtr & of, const F & f); + template<typename F> + static inline auto waitOnWriteRangeAndThen(size_t s, off_t o, const OpenFilePtr & of, const F & f); ReqEnv reqEnv(); diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp index c50dcf1..eeb5423 100644 --- a/netfs/fuse/fuseFiles.cpp +++ b/netfs/fuse/fuseFiles.cpp @@ -115,8 +115,8 @@ namespace NetFS { } } - template<typename Rtn, typename F> - inline Rtn + template<typename F> + inline auto FuseApp::waitOnWriteRangeAndThen(size_t s, off_t o, const OpenFilePtr & of, const F & f) { const auto key = OpenFile::range(o, s); @@ -186,7 +186,7 @@ namespace NetFS { blockSizeIterate( blockSizes, [&ops, &o, &of, &remote, blockOffset = 0U](safe<size_t> blockSize) mutable { ops.emplace_back(blockOffset, - waitOnWriteRangeAndThen<std::future<Buffer>>( + waitOnWriteRangeAndThen( blockSize, o, of, [o, blockSize, &remote](const auto &) { return remote->readAsync(o, blockSize); })); @@ -226,8 +226,7 @@ namespace NetFS { auto bytes = reinterpret_cast<const ::Ice::Byte *>(buf); if (fcr->Async) { blockSizeIterate(of->blockSizes(s), [&bytes, &o, &remote, &of](safe<size_t> blockSize) { - waitOnWriteRangeAndThen<void>( - blockSize, o, of, [o, blockSize, bytes, &of, remote](const auto & key) { + waitOnWriteRangeAndThen(blockSize, o, of, [o, blockSize, bytes, &of, remote](const auto & key) { auto p = std::make_shared<OpenFile::WriteState>(); of->bg.insert({key, p}); remote->writeAsync( |