svn commit: r348208 - projects/fuse2/sys/fs/fuse

Alan Somers asomers at FreeBSD.org
Thu May 23 22:57:59 UTC 2019


Author: asomers
Date: Thu May 23 22:57:57 2019
New Revision: 348208
URL: https://svnweb.freebsd.org/changeset/base/348208

Log:
  fusefs: assume the mountpoint's generation is 0
  
  This seems to be libfuse's behavior (its documentation notwithstanding).
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/sys/fs/fuse/fuse_node.c

Modified: projects/fuse2/sys/fs/fuse/fuse_node.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_node.c	Thu May 23 22:49:03 2019	(r348207)
+++ projects/fuse2/sys/fs/fuse/fuse_node.c	Thu May 23 22:57:57 2019	(r348208)
@@ -263,7 +263,11 @@ fuse_vnode_get(struct mount *mp,
     enum vtype vtyp)
 {
 	struct thread *td = (cnp != NULL ? cnp->cn_thread : curthread);
-	uint64_t generation = feo ? feo->generation : 1;
+	/* 
+	 * feo should only be NULL for the root directory, which (when libfuse
+	 * is used) always has generation 0
+	 */
+	uint64_t generation = feo ? feo->generation : 0;
 	int err = 0;
 
 	err = fuse_vnode_alloc(mp, td, nodeid, vtyp, vpp);


More information about the svn-src-projects mailing list