summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-05-02 13:07:03 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-05-02 13:07:03 +0100
commitf974a8287ac6b477e8940e86f333d9b3e2458933 (patch)
treec1486d4e16677d844f38c428f6a2ffb2ba4bc39f
parentDon't remove failed BG op, we need to throw it later (diff)
downloadnetfs-f974a8287ac6b477e8940e86f333d9b3e2458933.tar.bz2
netfs-f974a8287ac6b477e8940e86f333d9b3e2458933.tar.xz
netfs-f974a8287ac6b477e8940e86f333d9b3e2458933.zip
Rethrow flush failures in release
-rw-r--r--netfs/fuse/fuseFiles.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp
index 8781772..7bd86ca 100644
--- a/netfs/fuse/fuseFiles.cpp
+++ b/netfs/fuse/fuseFiles.cpp
@@ -85,11 +85,14 @@ namespace NetFS {
auto remote = of->remote;
try {
of->flush();
+ clearProxy<OpenFilePtr>(fi->fh);
+ remote->close();
}
catch (SystemError & e) {
+ clearProxy<OpenFilePtr>(fi->fh);
+ remote->close();
+ throw;
}
- remote->close();
- clearProxy<OpenFilePtr>(fi->fh);
return 0;
}
catch (SystemError & e) {