shithub: gefs

Download patch

ref: 413a40efbd10773e06efd6833efea42c920f7d2d
parent: 675f57b02443c0e9f57a584018687d4ede3ae83c
author: Michael Forney <mforney@mforney.org>
date: Mon Feb 14 08:03:26 EST 2022

fs: use lookup in fsstat to lock f->mnt
We may be in the process of creating a new snap and changing the
f->mnt->root pointer.

--- a/fs.c
+++ b/fs.c
@@ -903,7 +903,7 @@
 		rerror(m, Efid);
 		return;
 	}
-	if((err = btlookup(f->mnt->root, f->dent, &kv, kvbuf, sizeof(kvbuf))) != nil){
+	if((err = lookup(f, f->dent, &kv, kvbuf, sizeof(kvbuf), 0)) != nil){
 		rerror(m, err);
 		putfid(f);
 		return;