Module Name:    src
Committed By:   bouyer
Date:           Thu Feb 17 10:37:56 UTC 2011

Modified Files:
        src/sys/ufs/ffs [bouyer-quota2]: ffs_snapshot.c

Log Message:
Do not adjust quota when a snapshot inode is cleared in a snapshot view.


To generate a diff of this commit:
cvs rdiff -u -r1.102.4.2 -r1.102.4.3 src/sys/ufs/ffs/ffs_snapshot.c

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

Modified files:

Index: src/sys/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.2 src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.3
--- src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.2	Sat Feb 12 21:48:09 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Thu Feb 17 10:37:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.102.4.2 2011/02/12 21:48:09 bouyer Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.102.4.3 2011/02/17 10:37:55 bouyer Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.102.4.2 2011/02/12 21:48:09 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.102.4.3 2011/02/17 10:37:55 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -214,7 +214,7 @@
 	error = snapshot_setup(mp, vp);
 	if (error)
 		goto out;
-	/* quota inodes are not accounted in quotas */
+	/* shapshot inodes are not accounted in quotas */
 #if defined(QUOTA) || defined(QUOTA2)
 	chkdq(ip, -DIP(ip, blocks), l->l_cred, 0);
 	chkiq(ip, -1, l->l_cred, 0);
@@ -1036,10 +1036,6 @@
 		    ufs_rw32(ufs_rw32(dip1->di_flags, ns) & ~SF_SNAPSHOT, ns);
 		memset(&dip1->di_db[0], 0, (NDADDR + NIADDR) * sizeof(int32_t));
 		/* quota inodes are not accounted in quotas */
-#if defined(QUOTA) || defined(QUOTA2)
-		if (dip1->di_mode != 0)
-			chkiq(cancelip, 1, l->l_cred, FORCE);
-#endif
 	} else {
 		dip2 = (struct ufs2_dinode *)bp->b_data +
 		    ino_to_fsbo(fs, cancelip->i_number);
@@ -1050,10 +1046,6 @@
 		dip2->di_flags =
 		    ufs_rw32(ufs_rw32(dip2->di_flags, ns) & ~SF_SNAPSHOT, ns);
 		memset(&dip2->di_db[0], 0, (NDADDR + NIADDR) * sizeof(int64_t));
-#if defined(QUOTA) || defined(QUOTA2)
-		if (dip2->di_mode != 0)
-			chkiq(cancelip, 1, l->l_cred, FORCE);
-#endif
 	}
 	bdwrite(bp);
 	/*

Reply via email to