shithub: gefs

Download patch

ref: 6eaec2a188e81d8c3d9fe9fbf17223b661e96f35
parent: 6caee0300e6e8e51551a6a277ef4c6c9113982ff
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Nov 3 18:43:25 EDT 2023

fix typos

--- a/fs.c
+++ b/fs.c
@@ -2210,7 +2210,7 @@
 	Msg m;
 	int i;
 
-	if((oldhd = calloc(fs->narena, sizeof(Bptr)) == nil)
+	if((oldhd = calloc(fs->narena, sizeof(Bptr))) == nil)
 		sysfatal("malloc log heads");
 	while(1){
 		am = chrecv(fs->admchan);
@@ -2220,7 +2220,7 @@
 				a = &fs->arenas[i];
 				qlock(a);
 				if(a->nlog < a->reserve/(10*Blksz)){
-					oldhd = (Bptr){-1, -1, -1};
+					oldhd[i] = (Bptr){-1, -1, -1};
 					qunlock(a);
 					continue;
 				}
@@ -2232,7 +2232,6 @@
 				epochend(id);
 				epochclean();
 			}
-
 			qlock(&fs->mutlk);
 			if(am->halt)
 				ainc(&fs->rdonly);