ref: 65978672633bc578659cc95128f5ce3a20828b33
parent: cae437ccbbb8859686eb1a5a37e598624026befa
author: Ori Bernstein <[email protected]>
date: Sun Dec 10 16:49:16 EST 2023
fs: unlock mutlk if we get an upsert error
--- a/fs.c
+++ b/fs.c
@@ -2294,6 +2294,10 @@
}
for(off = am->off; off < am->length; off += Blksz){
qlock(&fs->mutlk);
+ if(waserror()){
+ qunlock(&fs->mutlk);
+ nexterror();
+ }
epochstart(id);
m.k = buf;
m.nk = sizeof(buf);
@@ -2307,6 +2311,7 @@
epochend(id);
qunlock(&fs->mutlk);
epochclean();
+ poperror();
}
if(am->dent != nil){
qunlock(&am->dent->trunclk);