Module Name:    src
Committed By:   riz
Date:           Mon Aug  8 19:56:50 UTC 2011

Modified Files:
        src/lib/librefuse [netbsd-5]: refuse.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #1650):
        lib/librefuse/refuse.c: revision 1.94
Call the FUSE init operation before we try to access the file-system.
This prevents a crash in "fuse_ext2" which I previously worked around
with a patch.


To generate a diff of this commit:
cvs rdiff -u -r1.89.4.1 -r1.89.4.2 src/lib/librefuse/refuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librefuse/refuse.c
diff -u src/lib/librefuse/refuse.c:1.89.4.1 src/lib/librefuse/refuse.c:1.89.4.2
--- src/lib/librefuse/refuse.c:1.89.4.1	Mon Aug  8 19:53:29 2011
+++ src/lib/librefuse/refuse.c	Mon Aug  8 19:56:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: refuse.c,v 1.89.4.1 2011/08/08 19:53:29 riz Exp $	*/
+/*	$NetBSD: refuse.c,v 1.89.4.2 2011/08/08 19:56:50 riz Exp $	*/
 
 /*
  * Copyright � 2007 Alistair Crooks.  All rights reserved.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: refuse.c,v 1.89.4.1 2011/08/08 19:53:29 riz Exp $");
+__RCSID("$NetBSD: refuse.c,v 1.89.4.2 2011/08/08 19:56:50 riz Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -1298,6 +1298,9 @@
 
 	fuse->fc = fc;
 
+	if (fuse->op.init != NULL)
+		fusectx->private_data = fuse->op.init(NULL); /* XXX */
+
 	/* initialise the puffs operations structure */
         PUFFSOP_INIT(pops);
 
@@ -1361,9 +1364,6 @@
 			puffs_stat2vattr(&pn_root->pn_va, &st);
 	assert(pn_root->pn_va.va_type == VDIR);
 
-	if (fuse->op.init)
-		fusectx->private_data = fuse->op.init(NULL); /* XXX */
-
 	puffs_set_prepost(pu, set_fuse_context_pid, NULL);
 
 	puffs_zerostatvfs(&svfsb);

Reply via email to