Module Name: src Committed By: dholland Date: Sun Jan 29 06:52:39 UTC 2012
Modified Files: src/sys/kern: vfs_quotactl.c src/sys/sys: quotactl.h src/sys/ufs/ufs: ufs_quota.c ufs_quota.h ufs_quota2.c Log Message: The handling of QUOTACTL_CLEAR does not use the proplib data dictionary, so don't pass it. Note: this change requires a kernel version bump. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/kern/vfs_quotactl.c cvs rdiff -u -r1.14 -r1.15 src/sys/sys/quotactl.h cvs rdiff -u -r1.88 -r1.89 src/sys/ufs/ufs/ufs_quota.c cvs rdiff -u -r1.10 -r1.11 src/sys/ufs/ufs/ufs_quota.h cvs rdiff -u -r1.11 -r1.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/kern/vfs_quotactl.c diff -u src/sys/kern/vfs_quotactl.c:1.16 src/sys/kern/vfs_quotactl.c:1.17 --- src/sys/kern/vfs_quotactl.c:1.16 Sun Jan 29 06:51:42 2012 +++ src/sys/kern/vfs_quotactl.c Sun Jan 29 06:52:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_quotactl.c,v 1.16 2012/01/29 06:51:42 dholland Exp $ */ +/* $NetBSD: vfs_quotactl.c,v 1.17 2012/01/29 06:52:38 dholland Exp $ */ /* * Copyright (c) 1991, 1993, 1994 @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.16 2012/01/29 06:51:42 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.17 2012/01/29 06:52:38 dholland Exp $"); #include <sys/mount.h> #include <sys/quota.h> @@ -495,7 +495,6 @@ vfs_quotactl_clear(struct mount *mp, args.u.clear.qc_idtype = q2type; args.u.clear.qc_id = id; args.u.clear.qc_defaultq = defaultq; - args.u.clear.qc_data = data; error = VFS_QUOTACTL(mp, QUOTACTL_CLEAR, &args); if (error) { goto err; Index: src/sys/sys/quotactl.h diff -u src/sys/sys/quotactl.h:1.14 src/sys/sys/quotactl.h:1.15 --- src/sys/sys/quotactl.h:1.14 Sun Jan 29 06:51:43 2012 +++ src/sys/sys/quotactl.h Sun Jan 29 06:52:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quotactl.h,v 1.14 2012/01/29 06:51:43 dholland Exp $ */ +/* $NetBSD: quotactl.h,v 1.15 2012/01/29 06:52:39 dholland Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -77,7 +77,6 @@ struct vfs_quotactl_args { int qc_idtype; id_t qc_id; int qc_defaultq; - prop_dictionary_t qc_data; } clear; } u; }; Index: src/sys/ufs/ufs/ufs_quota.c diff -u src/sys/ufs/ufs/ufs_quota.c:1.88 src/sys/ufs/ufs/ufs_quota.c:1.89 --- src/sys/ufs/ufs/ufs_quota.c:1.88 Sun Jan 29 06:51:43 2012 +++ src/sys/ufs/ufs/ufs_quota.c Sun Jan 29 06:52:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota.c,v 1.88 2012/01/29 06:51:43 dholland Exp $ */ +/* $NetBSD: ufs_quota.c,v 1.89 2012/01/29 06:52:39 dholland Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993, 1995 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.88 2012/01/29 06:51:43 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.89 2012/01/29 06:52:39 dholland Exp $"); #if defined(_KERNEL_OPT) #include "opt_quota.h" @@ -319,16 +319,12 @@ quota_handle_cmd_clear(struct mount *mp, int idtype; id_t id; int defaultq; - prop_dictionary_t data; int error; KASSERT(args->qc_type == QCT_CLEAR); idtype = args->u.clear.qc_idtype; id = args->u.clear.qc_id; defaultq = args->u.clear.qc_defaultq; - data = args->u.clear.qc_data; - - KASSERT(prop_object_type(data) == PROP_TYPE_DICTIONARY); if ((ump->um_flags & UFS_QUOTA2) == 0) return EOPNOTSUPP; @@ -341,8 +337,8 @@ quota_handle_cmd_clear(struct mount *mp, goto err; #ifdef QUOTA2 if (ump->um_flags & UFS_QUOTA2) { - error = quota2_handle_cmd_clear(ump, idtype, id, defaultq, - data); + error = quota2_handle_cmd_clear(ump, idtype, id, + defaultq); } else #endif panic("quota_handle_cmd_get: no support ?"); Index: src/sys/ufs/ufs/ufs_quota.h diff -u src/sys/ufs/ufs/ufs_quota.h:1.10 src/sys/ufs/ufs/ufs_quota.h:1.11 --- src/sys/ufs/ufs/ufs_quota.h:1.10 Sun Jan 29 06:49:44 2012 +++ src/sys/ufs/ufs/ufs_quota.h Sun Jan 29 06:52:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota.h,v 1.10 2012/01/29 06:49:44 dholland Exp $ */ +/* $NetBSD: ufs_quota.h,v 1.11 2012/01/29 06:52:39 dholland Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993, 1995 @@ -127,7 +127,7 @@ int quota2_handle_cmd_get(struct ufsmoun struct quotaval *); int quota2_handle_cmd_put(struct ufsmount *, const struct quotakey *, const struct quotaval *); -int quota2_handle_cmd_clear(struct ufsmount *, int, int, int, prop_dictionary_t); +int quota2_handle_cmd_clear(struct ufsmount *, int, int, int); int quota2_handle_cmd_getall(struct ufsmount *, int, prop_array_t); int q2sync(struct mount *); int dq2get(struct vnode *, u_long, struct ufsmount *, int, struct dquot *); Index: src/sys/ufs/ufs/ufs_quota2.c diff -u src/sys/ufs/ufs/ufs_quota2.c:1.11 src/sys/ufs/ufs/ufs_quota2.c:1.12 --- src/sys/ufs/ufs/ufs_quota2.c:1.11 Sun Jan 29 06:49:44 2012 +++ src/sys/ufs/ufs/ufs_quota2.c Sun Jan 29 06:52:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota2.c,v 1.11 2012/01/29 06:49:44 dholland Exp $ */ +/* $NetBSD: ufs_quota2.c,v 1.12 2012/01/29 06:52:39 dholland Exp $ */ /*- * Copyright (c) 2010 Manuel Bouyer * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.11 2012/01/29 06:49:44 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.12 2012/01/29 06:52:39 dholland Exp $"); #include <sys/buf.h> #include <sys/param.h> @@ -708,8 +708,8 @@ dq2clear_callback(struct ufsmount *ump, return 0; } int -quota2_handle_cmd_clear(struct ufsmount *ump, int type, int id, - int defaultq, prop_dictionary_t data) +quota2_handle_cmd_clear(struct ufsmount *ump, int idtype, int id, + int defaultq) { int error, i; struct dquot *dq; @@ -719,14 +719,14 @@ quota2_handle_cmd_clear(struct ufsmount u_long hash_mask; struct dq2clear_callback c; - if (ump->um_quotas[type] == NULLVP) + if (ump->um_quotas[idtype] == NULLVP) return ENODEV; if (defaultq) return EOPNOTSUPP; /* get the default entry before locking the entry's buffer */ mutex_enter(&dqlock); - error = getq2h(ump, type, &hbp, &q2h, 0); + error = getq2h(ump, idtype, &hbp, &q2h, 0); if (error) { mutex_exit(&dqlock); return error; @@ -736,7 +736,7 @@ quota2_handle_cmd_clear(struct ufsmount mutex_exit(&dqlock); brelse(hbp, 0); - error = dqget(NULLVP, id, ump, type, &dq); + error = dqget(NULLVP, id, ump, idtype, &dq); if (error) return error; @@ -750,7 +750,7 @@ quota2_handle_cmd_clear(struct ufsmount if (error) goto out_dq; - error = getq2e(ump, type, dq->dq2_lblkno, dq->dq2_blkoff, + error = getq2e(ump, idtype, dq->dq2_lblkno, dq->dq2_blkoff, &bp, &q2ep, B_MODIFY); if (error) goto out_wapbl; @@ -773,7 +773,7 @@ quota2_handle_cmd_clear(struct ufsmount /* we can free it. release bp so we can walk the list */ brelse(bp, 0); mutex_enter(&dqlock); - error = getq2h(ump, type, &hbp, &q2h, 0); + error = getq2h(ump, idtype, &hbp, &q2h, 0); if (error) goto out_dqlock; @@ -781,7 +781,7 @@ quota2_handle_cmd_clear(struct ufsmount c.dq = dq; c.id = id; c.q2h = q2h; - error = quota2_walk_list(ump, hbp, type, + error = quota2_walk_list(ump, hbp, idtype, &q2h->q2h_entries[id & hash_mask], B_MODIFY, &c, dq2clear_callback);