shithub: front

Download patch

ref: e6fa5a21f97c13caea47c0a434d5672ab45da2d6
parent: d76c9642e0985b6791ed723234a22ec383102aff
author: Ori Bernstein <ori@eigenstate.org>
date: Wed May 22 21:51:11 EDT 2024

fs: acquire mutation lock around ORCLOSE upsert

only one upsert can go at once.

--- a/sys/src/cmd/gefs/fs.c
+++ b/sys/src/cmd/gefs/fs.c
@@ -2555,7 +2555,9 @@
 				mb[nm].nv = 0;
 				nm++;
 			}
+			qlock(&fs->mutlk);
 			upsert(am->mnt, mb, nm);
+			qunlock(&fs->mutlk);
 			/* fallthrough */
 		case AOclear:
 			tracem("bgclear");
--