git: 9front

Download patch

ref: f02c92a5fb2d18e1248a67b15cd2ec7dcea2b4d7
parent: 8d1c7a833ba8849bd6845c1402549c026c234605
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");
--