Sun Jan 29 06:52:39 2012 UTC ()
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.
(dholland)
diff -r1.16 -r1.17 src/sys/kern/vfs_quotactl.c
diff -r1.14 -r1.15 src/sys/sys/quotactl.h
diff -r1.88 -r1.89 src/sys/ufs/ufs/ufs_quota.c
diff -r1.10 -r1.11 src/sys/ufs/ufs/ufs_quota.h
diff -r1.11 -r1.12 src/sys/ufs/ufs/ufs_quota2.c
--- src/sys/kern/vfs_quotactl.c 2012/01/29 06:51:42 1.16
+++ src/sys/kern/vfs_quotactl.c 2012/01/29 06:52:38 1.17
@@ -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 @@
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;
--- src/sys/sys/quotactl.h 2012/01/29 06:51:43 1.14
+++ src/sys/sys/quotactl.h 2012/01/29 06:52:39 1.15
@@ -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 @@
int qc_idtype;
id_t qc_id;
int qc_defaultq;
- prop_dictionary_t qc_data;
} clear;
} u;
};
--- src/sys/ufs/ufs/ufs_quota.c 2012/01/29 06:51:43 1.88
+++ src/sys/ufs/ufs/ufs_quota.c 2012/01/29 06:52:39 1.89
@@ -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,17 +319,13 @@
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 @@
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 ?");
--- src/sys/ufs/ufs/ufs_quota.h 2012/01/29 06:49:44 1.10
+++ src/sys/ufs/ufs/ufs_quota.h 2012/01/29 06:52:39 1.11
@@ -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 @@
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 *);
--- src/sys/ufs/ufs/ufs_quota2.c 2012/01/29 06:49:44 1.11
+++ src/sys/ufs/ufs/ufs_quota2.c 2012/01/29 06:52:39 1.12
@@ -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 @@
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 @@
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 @@
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 @@
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 @@
/* 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 @@
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);