shithub: gefs

Download patch

ref: 51bfb048fabf48f78311194e0aca9ce672756cd7
parent: 1d1ce8f425a68210134fbfd3eefa8e80162d8e62
author: Michael Forney <mforney@mforney.org>
date: Thu Feb 10 01:10:42 EST 2022

blk: fix double unlock with full arena
blkalloc_lk is called with the arena already locked, and all callers
correctly balance their locks and unlocks, even in the failure case.

--- a/blk.c
+++ b/blk.c
@@ -544,10 +544,8 @@
 
 	t = a->free;
 	r = (Arange*)t->root;
-	if(r == nil){
-		unlock(a);
+	if(r == nil)
 		return -1;
-	}
 
 	/*
 	 * A bit of sleight of hand here: