From 73e797e3f31eb52b0074b86cd16949c827b75670 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:46:11 -0300 Subject: A lock another open holds fails at once with file in use instead of parking A contended lock parked until the holder unlocked, but through a kernel or FUSE mount the kernel serialises writes to one file, so the parked lock held up the holder's own unlock and close on that ctl, and the two deadlocked. acme's qlock blocks; here the second lock is refused at once with file in use (EBUSY) and the client retries, and nothing parks on the lock any more. Co-Authored-By: Claude Opus 5.5 --- src/ninep/tree.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ninep/tree.zig') diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig index a83b0193..f118e4b4 100644 --- a/src/ninep/tree.zig +++ b/src/ninep/tree.zig @@ -669,11 +669,9 @@ fn releaseHandle(p: *Pardes, req: Req) void { pn.fs.run = null; }, // Closing the open that holds the lock gives it up, as acme's clunk - // of its ctlfid does (editors/acme/xfid.c:211); a write parked on - // `lock` goes again. + // of its ctlfid does (editors/acme/xfid.c:211). .ctl => if (pn.fs.lock == req.handle) { pn.fs.lock = null; - pardes.turn.parked = true; }, .snapshot, .log => {}, }; -- cgit v1.3