shithub: gefs

Download patch

ref: d181a7286ee394a8a7b6ca7148904e5827ecabcb
parent: 806f0870bdb11f9af7554678eb1413f65ef75c5a
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Dec 1 00:46:18 EST 2023

fs: error handling cleanup

--- a/fs.c
+++ b/fs.c
@@ -969,15 +969,10 @@
 		r.count = 0;
 		if((af = getfid(m->conn, m->afid)) == nil)
 			error(Enofid);
-		if(waserror()){
-			putfid(af);
-			nexterror();
-		}
 		authread(af, &r, nil, 0);
+		putfid(af);
 		if(af->uid != uid)
 			error(Ebadu);
-		poperror();
-		putfid(af);
 	}else if(!fs->noauth && strcmp(m->uname, "none") != 0)
 		error(Ebadu);