Module Name: src Committed By: bouyer Date: Wed Feb 9 21:17:17 UTC 2011
Modified Files: src/sys/ufs/ufs [bouyer-quota2]: ufs_quota2.c Log Message: Make sure to not try to close the quota vnodes twice. To generate a diff of this commit: cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/ufs/ufs/ufs_quota2.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_quota2.c diff -u src/sys/ufs/ufs/ufs_quota2.c:1.1.2.11 src/sys/ufs/ufs/ufs_quota2.c:1.1.2.12 --- src/sys/ufs/ufs/ufs_quota2.c:1.1.2.11 Wed Feb 9 11:18:30 2011 +++ src/sys/ufs/ufs/ufs_quota2.c Wed Feb 9 21:17:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota2.c,v 1.1.2.11 2011/02/09 11:18:30 bouyer Exp $ */ +/* $NetBSD: ufs_quota2.c,v 1.1.2.12 2011/02/09 21:17:17 bouyer Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.1.2.11 2011/02/09 11:18:30 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.1.2.12 2011/02/09 21:17:17 bouyer Exp $"); #include <sys/buf.h> #include <sys/param.h> @@ -213,7 +213,7 @@ return 0; for (i = 0; i < MAXQUOTAS; i++) { - if (ump->um_quotas[i]) { + if (ump->um_quotas[i] != NULLVP) { error = vn_close(ump->um_quotas[i], FREAD|FWRITE, ump->um_cred[i]); if (error) { @@ -222,6 +222,7 @@ return error; } } + ump->um_quotas[i] = NULLVP; } return 0; }