Subject: Re: kern/35121: fss+quota -> panic("chkdquot: missing dquot")
To: None <gnats-bugs@netbsd.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: netbsd-bugs
Date: 11/26/2006 15:45:58
Pleas try this diff (created from -current -- should also work on >= 3.0):

--- ffs_snapshot.c.orig	2006-11-26 15:36:26.000000000 +0100
+++ ffs_snapshot.c	2006-11-26 15:36:30.000000000 +0100
@@ -43,4 +43,5 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_snapshot
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
+#include "opt_quota.h"
 #endif
 
@@ -187,4 +188,8 @@ ffs_snapshot(struct mount *mp, struct vn
 		return EACCES;
 
+#ifdef QUOTA
+	if ((error = getinoquota(VTOI(vp))) != 0)
+		return error;
+#endif
 	if (vp->v_size != 0) {
 		error = ffs_truncate(vp, 0, 0, NOCRED, l);

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)