Module Name: src
Committed By: dholland
Date: Sun Jan 29 07:20:27 UTC 2012
Modified Files:
src/sys/ufs/ufs: quota2.h ufs_quota2.c
Log Message:
quota2_check_limit() is used in only one place, so don't stuff it in a
header file.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/ufs/quota2.h
cvs rdiff -u -r1.28 -r1.29 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/quota2.h
diff -u src/sys/ufs/ufs/quota2.h:1.7 src/sys/ufs/ufs/quota2.h:1.8
--- src/sys/ufs/ufs/quota2.h:1.7 Sun Jan 29 07:17:41 2012
+++ src/sys/ufs/ufs/quota2.h Sun Jan 29 07:20:27 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: quota2.h,v 1.7 2012/01/29 07:17:41 dholland Exp $ */
+/* $NetBSD: quota2.h,v 1.8 2012/01/29 07:20:27 dholland Exp $ */
/*-
* Copyright (c) 2010 Manuel Bouyer
* All rights reserved.
@@ -28,7 +28,6 @@
#ifndef _UFS_UFS_QUOTA2_H_
#define _UFS_UFS_QUOTA2_H_
#include <ufs/ufs/quota.h>
-#include <quota/quota.h>
/* New disk quota implementation. In this implementation, the quota datas
@@ -108,10 +107,4 @@ void quota2_create_blk0(uint64_t, void *
void quota2_ufs_rwq2v(const struct quota2_val *, struct quota2_val *, int);
void quota2_ufs_rwq2e(const struct quota2_entry *, struct quota2_entry *, int);
-__inline static int __unused
-quota2_check_limit(struct quota2_val *q2v, uint64_t change, time_t now)
-{
- return quota_check_limit(q2v->q2v_cur, change, q2v->q2v_softlimit,
- q2v->q2v_hardlimit, q2v->q2v_time, now);
-}
#endif /* _UFS_UFS_QUOTA2_H_ */
Index: src/sys/ufs/ufs/ufs_quota2.c
diff -u src/sys/ufs/ufs/ufs_quota2.c:1.28 src/sys/ufs/ufs/ufs_quota2.c:1.29
--- src/sys/ufs/ufs/ufs_quota2.c:1.28 Sun Jan 29 07:18:17 2012
+++ src/sys/ufs/ufs/ufs_quota2.c Sun Jan 29 07:20:27 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.28 2012/01/29 07:18:17 dholland Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.29 2012/01/29 07:20:27 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.28 2012/01/29 07:18:17 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.29 2012/01/29 07:20:27 dholland Exp $");
#include <sys/buf.h>
#include <sys/param.h>
@@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c
#include <ufs/ufs/ufs_quota.h>
#include <ufs/ufs/ufs_wapbl.h>
+#include <quota/quota.h> /* XXX for quota_check_limit */
+
/*
* LOCKING:
* Data in the entries are protected by the associated struct dquot's
@@ -433,6 +435,13 @@ getinoquota2(struct inode *ip, bool allo
return 0;
}
+__inline static int __unused
+quota2_check_limit(struct quota2_val *q2v, uint64_t change, time_t now)
+{
+ return quota_check_limit(q2v->q2v_cur, change, q2v->q2v_softlimit,
+ q2v->q2v_hardlimit, q2v->q2v_time, now);
+}
+
static int
quota2_check(struct inode *ip, int vtype, int64_t change, kauth_cred_t cred,
int flags)