Module Name: src
Committed By: bouyer
Date: Mon Feb 14 15:38:16 UTC 2011
Modified Files:
src/sys/ufs/ufs [bouyer-quota2]: ufs_inode.c
Log Message:
Update quota in the same WAPBL transaction as we write mode=0 back to inode.
To generate a diff of this commit:
cvs rdiff -u -r1.83.4.1 -r1.83.4.2 src/sys/ufs/ufs/ufs_inode.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/ufs/ufs_inode.c
diff -u src/sys/ufs/ufs/ufs_inode.c:1.83.4.1 src/sys/ufs/ufs/ufs_inode.c:1.83.4.2
--- src/sys/ufs/ufs/ufs_inode.c:1.83.4.1 Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/ufs_inode.c Mon Feb 14 15:38:16 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_inode.c,v 1.83.4.1 2011/01/20 14:25:03 bouyer Exp $ */
+/* $NetBSD: ufs_inode.c,v 1.83.4.2 2011/02/14 15:38:16 bouyer Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.83.4.1 2011/01/20 14:25:03 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.83.4.2 2011/02/14 15:38:16 bouyer Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -103,9 +103,6 @@
if (error)
goto out;
logged = 1;
-#if defined(QUOTA) || defined(QUOTA2)
- (void)chkiq(ip, -1, NOCRED, 0);
-#endif
#ifdef UFS_EXTATTR
ufs_extattr_vnode_inactive(vp, curlwp);
#endif
@@ -140,6 +137,9 @@
if (!error)
error = UFS_TRUNCATE(vp, (off_t)0, 0, NOCRED);
}
+#if defined(QUOTA) || defined(QUOTA2)
+ (void)chkiq(ip, -1, NOCRED, 0);
+#endif
DIP_ASSIGN(ip, rdev, 0);
mode = ip->i_mode;
ip->i_mode = 0;