shithub: unionfs

Download patch

ref: a1a08e5b2ae3f03401e6f845a9bd6e53987770ab
parent: 6548fe9087f67d082c692cfd25b05103d32c8110
author: kvik <kvik@a-b.xyz>
date: Tue Feb 18 15:40:34 EST 2020

Axe unused code; qid map is forever, for now.

--- a/unionfs.c
+++ b/unionfs.c
@@ -24,7 +24,6 @@
 };
 
 struct Qtab {
-	Ref;
 	ushort type;
 	uint dev;
 	uvlong path, uniqpath;
@@ -170,29 +169,10 @@
 	h = qthash(q->path);
 	q->next = qidtab[h];
 	qidtab[h] = q;
-	return (Qtab*)copyref(q);
+	return q;
 }
 
 void
-qtfree(Qtab *q)
-{
-	int h;
-	Qtab *l;
-	
-	if(decref(q))
-		return;
-	h = qthash(q->path);
-	if(qidtab[h] == q)
-		qidtab[h] = q->next;
-	else{
-		for(l = qidtab[h]; l->next != q; l = l->next)
-			;
-		l->next = q->next;
-	}
-	free(q);
-}
-
-void
 unionlink(Union *p, Union *n)
 {
 	p = p->prev;
@@ -226,7 +206,6 @@
 		return;
 	if(decref(f))
 		return;
-//	qtfree(f->qtab);
 	free(f->name);
 	free(f->uid);
 	free(f->gid);