Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys The handling of QUOTACTL_CLEAR does not use the proplib ...
details: https://anonhg.NetBSD.org/src/rev/0635ae8fb846
branches: trunk
changeset: 773185:0635ae8fb846
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jan 29 06:52:38 2012 +0000
description:
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.
diffstat:
sys/kern/vfs_quotactl.c | 5 ++---
sys/sys/quotactl.h | 3 +--
sys/ufs/ufs/ufs_quota.c | 12 ++++--------
sys/ufs/ufs/ufs_quota.h | 4 ++--
sys/ufs/ufs/ufs_quota2.c | 20 ++++++++++----------
5 files changed, 19 insertions(+), 25 deletions(-)
diffs (189 lines):
diff -r b4bb107fa788 -r 0635ae8fb846 sys/kern/vfs_quotactl.c
--- a/sys/kern/vfs_quotactl.c Sun Jan 29 06:51:42 2012 +0000
+++ b/sys/kern/vfs_quotactl.c Sun Jan 29 06:52:38 2012 +0000
@@ -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;
diff -r b4bb107fa788 -r 0635ae8fb846 sys/sys/quotactl.h
--- a/sys/sys/quotactl.h Sun Jan 29 06:51:42 2012 +0000
+++ b/sys/sys/quotactl.h Sun Jan 29 06:52:38 2012 +0000
@@ -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;
};
diff -r b4bb107fa788 -r 0635ae8fb846 sys/ufs/ufs/ufs_quota.c
--- a/sys/ufs/ufs/ufs_quota.c Sun Jan 29 06:51:42 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota.c Sun Jan 29 06:52:38 2012 +0000
@@ -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 @@
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 ?");
diff -r b4bb107fa788 -r 0635ae8fb846 sys/ufs/ufs/ufs_quota.h
--- a/sys/ufs/ufs/ufs_quota.h Sun Jan 29 06:51:42 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota.h Sun Jan 29 06:52:38 2012 +0000
@@ -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 *);
diff -r b4bb107fa788 -r 0635ae8fb846 sys/ufs/ufs/ufs_quota2.c
--- a/sys/ufs/ufs/ufs_quota2.c Sun Jan 29 06:51:42 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota2.c Sun Jan 29 06:52:38 2012 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index