Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Add vfs_quotactl() in between the syscall and VFS_QUOTAC...



details:   https://anonhg.NetBSD.org/src/rev/e5d39d72260f
branches:  trunk
changeset: 773162:e5d39d72260f
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sun Jan 29 06:29:04 2012 +0000

description:
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.

diffstat:

 sys/compat/common/vfs_syscalls_50.c   |  12 ++++++------
 sys/compat/netbsd32/netbsd32_netbsd.c |   6 +++---
 sys/kern/vfs_quotactl.c               |  11 +++++++++--
 sys/kern/vfs_syscalls.c               |   6 +++---
 sys/sys/mount.h                       |   3 ++-
 5 files changed, 23 insertions(+), 15 deletions(-)

diffs (148 lines):

diff -r 37cedb759cf8 -r e5d39d72260f sys/compat/common/vfs_syscalls_50.c
--- a/sys/compat/common/vfs_syscalls_50.c       Sun Jan 29 06:26:54 2012 +0000
+++ b/sys/compat/common/vfs_syscalls_50.c       Sun Jan 29 06:29:04 2012 +0000
@@ -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)
diff -r 37cedb759cf8 -r e5d39d72260f sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Sun Jan 29 06:26:54 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Sun Jan 29 06:29:04 2012 +0000
@@ -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);
diff -r 37cedb759cf8 -r e5d39d72260f sys/kern/vfs_quotactl.c
--- a/sys/kern/vfs_quotactl.c   Sun Jan 29 06:26:54 2012 +0000
+++ b/sys/kern/vfs_quotactl.c   Sun Jan 29 06:29:04 2012 +0000
@@ -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);
+}
diff -r 37cedb759cf8 -r e5d39d72260f sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Sun Jan 29 06:26:54 2012 +0000
+++ b/sys/kern/vfs_syscalls.c   Sun Jan 29 06:29:04 2012 +0000
@@ -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);
diff -r 37cedb759cf8 -r e5d39d72260f sys/sys/mount.h
--- a/sys/sys/mount.h   Sun Jan 29 06:26:54 2012 +0000
+++ b/sys/sys/mount.h   Sun Jan 29 06:29:04 2012 +0000
@@ -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 */



Home | Main Index | Thread Index | Old Index