Sun Jan 29 06:29:05 2012 UTC ()
Add vfs_quotactl() in between the syscall and VFS_QUOTACTL. Call it
from the COMPAT_50 code as well as the current sys_quotactl instead
of going directly to VFS_QUOTACTL. Doesn't actually do anything yet.


(dholland)
diff -r1.11 -r1.12 src/sys/compat/common/vfs_syscalls_50.c
diff -r1.175 -r1.176 src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -r1.1 -r1.2 src/sys/kern/vfs_quotactl.c
diff -r1.442 -r1.443 src/sys/kern/vfs_syscalls.c
diff -r1.201 -r1.202 src/sys/sys/mount.h

cvs diff -r1.11 -r1.12 src/sys/compat/common/vfs_syscalls_50.c (expand / switch to context diff)
--- src/sys/compat/common/vfs_syscalls_50.c 2012/01/29 06:23:20 1.11
+++ src/sys/compat/common/vfs_syscalls_50.c 2012/01/29 06:29:04 1.12
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_50.c,v 1.11 2012/01/29 06:23:20 dholland Exp $	*/
+/*	$NetBSD: vfs_syscalls_50.c,v 1.12 2012/01/29 06:29:04 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.11 2012/01/29 06:23:20 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_50.c,v 1.12 2012/01/29 06:29:04 dholland Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -391,7 +391,7 @@
 do_quotaonoff:
 		if (!prop_dictionary_set_and_rel(dict, "commands", cmds))
 			goto out_dict;
-		error = VFS_QUOTACTL(mp, dict);
+		error = vfs_quotactl(mp, dict);
 		if (error)
 			goto out_dict;
 		if ((error = quota_get_cmds(dict, &cmds)) != 0)
@@ -423,7 +423,7 @@
 			goto out_cmds;
 		if (!prop_dictionary_set_and_rel(dict, "commands", cmds))
 			goto out_dict;
-		error = VFS_QUOTACTL(mp, dict);
+		error = vfs_quotactl(mp, dict);
 		if (error)
 			goto out_dict;
 		if ((error = quota_get_cmds(dict, &cmds)) != 0)
@@ -479,7 +479,7 @@
 			goto out_cmds;
 		if (!prop_dictionary_set_and_rel(dict, "commands", cmds))
 			goto out_dict;
-		error = VFS_QUOTACTL(mp, dict);
+		error = vfs_quotactl(mp, dict);
 		if (error)
 			goto out_dict;
 		if ((error = quota_get_cmds(dict, &cmds)) != 0)
@@ -508,7 +508,7 @@
 			goto out_cmds;
 		if (!prop_dictionary_set_and_rel(dict, "commands", cmds))
 			goto out_dict;
-		error = VFS_QUOTACTL(mp, dict);
+		error = vfs_quotactl(mp, dict);
 		if (error)
 			goto out_dict;
 		if ((error = quota_get_cmds(dict, &cmds)) != 0)

cvs diff -r1.175 -r1.176 src/sys/compat/netbsd32/netbsd32_netbsd.c (expand / switch to context diff)
--- src/sys/compat/netbsd32/netbsd32_netbsd.c 2011/11/15 14:13:17 1.175
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c 2012/01/29 06:29:04 1.176
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.175 2011/11/15 14:13:17 njoly Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.176 2012/01/29 06:29:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.175 2011/11/15 14:13:17 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.176 2012/01/29 06:29:04 dholland Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -1210,7 +1210,7 @@
 	error = prop_dictionary_copyin(&pref, &dict);
 	if (error)
 		return error;
-	error = VFS_QUOTACTL(mp, dict);
+	error = vfs_quotactl(mp, dict);
 	vrele(vp);
 	if (!error)
 		error = prop_dictionary_copyout(&pref, dict);

cvs diff -r1.1 -r1.2 src/sys/kern/vfs_quotactl.c (expand / switch to context diff)
--- src/sys/kern/vfs_quotactl.c 2012/01/29 06:26:55 1.1
+++ src/sys/kern/vfs_quotactl.c 2012/01/29 06:29:05 1.2
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_quotactl.c,v 1.1 2012/01/29 06:26:55 dholland Exp $	*/
+/*	$NetBSD: vfs_quotactl.c,v 1.2 2012/01/29 06:29:05 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -36,5 +36,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.1 2012/01/29 06:26:55 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.2 2012/01/29 06:29:05 dholland Exp $");
 
+#include <sys/mount.h>
+
+int
+vfs_quotactl(struct mount *mp, prop_dictionary_t dict)
+{
+	return VFS_QUOTACTL(mp, dict);
+}

cvs diff -r1.442 -r1.443 src/sys/kern/vfs_syscalls.c (expand / switch to context diff)
--- src/sys/kern/vfs_syscalls.c 2011/12/02 12:30:14 1.442
+++ src/sys/kern/vfs_syscalls.c 2012/01/29 06:29:05 1.443
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.442 2011/12/02 12:30:14 yamt Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.443 2012/01/29 06:29:05 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.442 2011/12/02 12:30:14 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.443 2012/01/29 06:29:05 dholland Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -626,7 +626,7 @@
 	error = prop_dictionary_copyin(&pref, &dict);
 	if (error)
 		return error;
-	error = VFS_QUOTACTL(mp, dict);
+	error = vfs_quotactl(mp, dict);
 	vrele(vp);
 	if (!error)
 		error = prop_dictionary_copyout(&pref, dict);

cvs diff -r1.201 -r1.202 src/sys/sys/mount.h (expand / switch to context diff)
--- src/sys/sys/mount.h 2011/10/12 23:04:22 1.201
+++ src/sys/sys/mount.h 2012/01/29 06:29:04 1.202
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.h,v 1.201 2011/10/12 23:04:22 dholland Exp $	*/
+/*	$NetBSD: mount.h,v 1.202 2012/01/29 06:29:04 dholland Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -407,6 +407,7 @@
 int	vfs_stdextattrctl(struct mount *, int, struct vnode *,
 	    int, const char *);
 void	vfs_insmntque(struct vnode *, struct mount *);
+int	vfs_quotactl(struct mount *, prop_dictionary_t);
 
 extern	CIRCLEQ_HEAD(mntlist, mount) mountlist;	/* mounted filesystem list */
 extern	struct vfsops *vfssw[];			/* filesystem type table */