shithub: gefs

Download patch

ref: edc5db5c942bb79d17992c8e0aacb212593eff00
parent: 736cb14cb5327a57d21beb27f028ff2e39bc1342
author: Ori Bernstein <[email protected]>
date: Wed Oct 18 13:27:48 EDT 2023

snap: special case freeing of snap deadlist

--- a/snap.c
+++ b/snap.c
@@ -126,6 +126,8 @@
 {
 	Dlist *dt;
 
+	if(dl == &fs->snapdl)
+		return;
 	dlcachedel(dl, 0);
 	dl->cprev = nil;
 	dl->cnext = fs->dlhead;
@@ -506,7 +508,8 @@
 		if(clear){
 			if(dl->ins != nil)
 				dropblk(dl->ins);
-			free(dl);
+			if(dl != &fs->snapdl)
+				free(dl);
 		}
 	}
 	if(clear){