Source-Changes-HG archive

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

[src/ktrace-lwp]: src/sys/fs/tmpfs Adapt to branch



details:   https://anonhg.NetBSD.org/src/rev/e281a5fe0d5b
branches:  ktrace-lwp
changeset: 548956:e281a5fe0d5b
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Nov 12 17:00:57 2005 +0000

description:
Adapt to branch

diffstat:

 sys/fs/tmpfs/tmpfs.h        |   4 ++--
 sys/fs/tmpfs/tmpfs_subr.c   |  12 ++++++------
 sys/fs/tmpfs/tmpfs_vfsops.c |  32 ++++++++++++++++----------------
 sys/fs/tmpfs/tmpfs_vnops.c  |  26 +++++++++++++-------------
 4 files changed, 37 insertions(+), 37 deletions(-)

diffs (279 lines):

diff -r 9e9cfed865a0 -r e281a5fe0d5b sys/fs/tmpfs/tmpfs.h
--- a/sys/fs/tmpfs/tmpfs.h      Sat Nov 12 13:25:02 2005 +0000
+++ b/sys/fs/tmpfs/tmpfs.h      Sat Nov 12 17:00:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs.h,v 1.9.2.2 2005/11/10 14:09:44 skrll Exp $      */
+/*     $NetBSD: tmpfs.h,v 1.9.2.3 2005/11/12 17:00:57 skrll Exp $      */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -330,7 +330,7 @@
            struct proc *);
 int    tmpfs_chsize(struct vnode *, u_quad_t, struct ucred *, struct proc *);
 int    tmpfs_chtimes(struct vnode *, struct timespec *, struct timespec *,
-           int, struct ucred *, struct proc *);
+           int, struct ucred *, struct lwp *);
 void   tmpfs_itimes(struct vnode *, const struct timespec *,
            const struct timespec *);
 
diff -r 9e9cfed865a0 -r e281a5fe0d5b sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c Sat Nov 12 13:25:02 2005 +0000
+++ b/sys/fs/tmpfs/tmpfs_subr.c Sat Nov 12 17:00:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_subr.c,v 1.13.2.2 2005/11/10 14:09:44 skrll Exp $        */
+/*     $NetBSD: tmpfs_subr.c,v 1.13.2.3 2005/11/12 17:00:57 skrll Exp $        */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.13.2.2 2005/11/10 14:09:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.13.2.3 2005/11/12 17:00:57 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/dirent.h>
@@ -495,7 +495,7 @@
        /* Allocate a node that represents the new file. */
        error = tmpfs_alloc_node(tmp, vap->va_type, cnp->cn_cred->cr_uid,
            dnode->tn_gid, vap->va_mode, parent, target, vap->va_rdev,
-           cnp->cn_proc, &node);
+           cnp->cn_lwp->l_proc, &node);
        if (error != 0)
                goto out;
 
@@ -1187,7 +1187,7 @@
  */
 int
 tmpfs_chtimes(struct vnode *vp, struct timespec *atime, struct timespec *mtime,
-    int vaflags, struct ucred *cred, struct proc *p)
+    int vaflags, struct ucred *cred, struct lwp *l)
 {
        int error;
        struct tmpfs_node *node;
@@ -1208,9 +1208,9 @@
         * several other file systems.  Shouldn't this be centralized
         * somewhere? */
        if (cred->cr_uid != node->tn_uid &&
-           (error = suser(cred, &p->p_acflag)) &&
+           (error = suser(cred, &l->l_proc->p_acflag)) &&
            ((vaflags & VA_UTIMES_NULL) == 0 ||
-           (error = VOP_ACCESS(vp, VWRITE, cred, p))))
+           (error = VOP_ACCESS(vp, VWRITE, cred, l))))
                return error;
 
        if (atime->tv_sec != VNOVAL && atime->tv_nsec != VNOVAL)
diff -r 9e9cfed865a0 -r e281a5fe0d5b sys/fs/tmpfs/tmpfs_vfsops.c
--- a/sys/fs/tmpfs/tmpfs_vfsops.c       Sat Nov 12 13:25:02 2005 +0000
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c       Sat Nov 12 17:00:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_vfsops.c,v 1.9.6.2 2005/11/10 14:09:44 skrll Exp $       */
+/*     $NetBSD: tmpfs_vfsops.c,v 1.9.6.3 2005/11/12 17:00:57 skrll Exp $       */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.9.6.2 2005/11/10 14:09:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.9.6.3 2005/11/12 17:00:57 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -66,17 +66,17 @@
 /* --------------------------------------------------------------------- */
 
 static int     tmpfs_mount(struct mount *, const char *, void *,
-                   struct nameidata *, struct proc *);
-static int     tmpfs_start(struct mount *, int, struct proc *);
-static int     tmpfs_unmount(struct mount *, int, struct proc *);
+                   struct nameidata *, struct lwp *);
+static int     tmpfs_start(struct mount *, int, struct lwp *);
+static int     tmpfs_unmount(struct mount *, int, struct lwp *);
 static int     tmpfs_root(struct mount *, struct vnode **);
 static int     tmpfs_quotactl(struct mount *, int, uid_t, void *,
-                   struct proc *);
+                   struct lwp *);
 static int     tmpfs_vget(struct mount *, ino_t, struct vnode **);
 static int     tmpfs_fhtovp(struct mount *, struct fid *, struct vnode **);
 static int     tmpfs_vptofh(struct vnode *, struct fid *);
-static int     tmpfs_statvfs(struct mount *, struct statvfs *, struct proc *);
-static int     tmpfs_sync(struct mount *, int, struct ucred *, struct proc *);
+static int     tmpfs_statvfs(struct mount *, struct statvfs *, struct lwp *);
+static int     tmpfs_sync(struct mount *, int, struct ucred *, struct lwp *);
 static void    tmpfs_init(void);
 static void    tmpfs_done(void);
 static int     tmpfs_snapshot(struct mount *, struct vnode *,
@@ -86,7 +86,7 @@
 
 static int
 tmpfs_mount(struct mount *mp, const char *path, void *data,
-    struct nameidata *ndp, struct proc *p)
+    struct nameidata *ndp, struct lwp *l)
 {
        int error;
        ino_t nodes;
@@ -175,7 +175,7 @@
        /* Allocate the root node. */
        error = tmpfs_alloc_node(tmp, VDIR, args.ta_root_uid,
            args.ta_root_gid, args.ta_root_mode & ALLPERMS, NULL, NULL,
-           VNOVAL, p, &root);
+           VNOVAL, l->l_proc, &root);
        KASSERT(error == 0 && root != NULL);
        tmp->tm_root = root;
 
@@ -185,13 +185,13 @@
        vfs_getnewfsid(mp);
 
        return set_statvfs_info(path, UIO_USERSPACE, "tmpfs", UIO_SYSSPACE,
-           mp, p);
+           mp, l);
 }
 
 /* --------------------------------------------------------------------- */
 
 static int
-tmpfs_start(struct mount *mp, int flags, struct proc *p)
+tmpfs_start(struct mount *mp, int flags, struct lwp *l)
 {
 
        return 0;
@@ -201,7 +201,7 @@
 
 /* ARGSUSED2 */
 static int
-tmpfs_unmount(struct mount *mp, int mntflags, struct proc *p)
+tmpfs_unmount(struct mount *mp, int mntflags, struct lwp *l)
 {
        int error;
        int flags = 0;
@@ -282,7 +282,7 @@
 
 static int
 tmpfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg,
-    struct proc *p)
+    struct lwp *l)
 {
 
        printf("tmpfs_quotactl called; need for it unknown yet\n");
@@ -352,7 +352,7 @@
 
 /* ARGSUSED2 */
 static int
-tmpfs_statvfs(struct mount *mp, struct statvfs *sbp, struct proc *p)
+tmpfs_statvfs(struct mount *mp, struct statvfs *sbp, struct lwp *l)
 {
        fsfilcnt_t freenodes, usednodes;
        struct tmpfs_mount *tmp;
@@ -388,7 +388,7 @@
 
 /* ARGSUSED0 */
 static int
-tmpfs_sync(struct mount *mp, int waitfor, struct ucred *uc, struct proc *p)
+tmpfs_sync(struct mount *mp, int waitfor, struct ucred *uc, struct lwp *l)
 {
 
        return 0;
diff -r 9e9cfed865a0 -r e281a5fe0d5b sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c        Sat Nov 12 13:25:02 2005 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c        Sat Nov 12 17:00:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_vnops.c,v 1.17.2.2 2005/11/10 14:09:44 skrll Exp $       */
+/*     $NetBSD: tmpfs_vnops.c,v 1.17.2.3 2005/11/12 17:00:57 skrll Exp $       */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.17.2.2 2005/11/10 14:09:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.17.2.3 2005/11/12 17:00:57 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/dirent.h>
@@ -136,7 +136,7 @@
        *vpp = NULL;
 
        /* Check accessibility of requested node as a first step. */
-       error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_proc);
+       error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_lwp);
        if (error != 0)
                goto out;
 
@@ -187,7 +187,7 @@
                            (cnp->cn_nameiop == CREATE || \
                            cnp->cn_nameiop == RENAME)) {
                                error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred,
-                                   cnp->cn_proc);
+                                   cnp->cn_lwp);
                                if (error != 0)
                                        goto out;
 
@@ -223,7 +223,7 @@
                            (cnp->cn_nameiop == DELETE ||
                            cnp->cn_nameiop == RENAME)) {
                                error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred,
-                                   cnp->cn_proc);
+                                   cnp->cn_lwp);
                                if (error != 0)
                                        goto out;
                                /* TODO: Check sticky bit. */
@@ -453,7 +453,7 @@
        struct vnode *vp = ((struct vop_setattr_args *)v)->a_vp;
        struct vattr *vap = ((struct vop_setattr_args *)v)->a_vap;
        struct ucred *cred = ((struct vop_setattr_args *)v)->a_cred;
-       struct proc *p = ((struct vop_setattr_args *)v)->a_p;
+       struct lwp *l = ((struct vop_setattr_args *)v)->a_l;
 
        int error;
 
@@ -477,23 +477,23 @@
                error = EINVAL;
 
        if (error == 0 && (vap->va_flags != VNOVAL))
-               error = tmpfs_chflags(vp, vap->va_flags, cred, p);
+               error = tmpfs_chflags(vp, vap->va_flags, cred, l->l_proc);
 
        if (error == 0 && (vap->va_size != VNOVAL))
-               error = tmpfs_chsize(vp, vap->va_size, cred, p);
+               error = tmpfs_chsize(vp, vap->va_size, cred, l->l_proc);
 
        if (error == 0 && (vap->va_uid != VNOVAL || vap->va_gid != VNOVAL))
-               error = tmpfs_chown(vp, vap->va_uid, vap->va_gid, cred, p);
+               error = tmpfs_chown(vp, vap->va_uid, vap->va_gid, cred, l->l_proc);
 
        if (error == 0 && (vap->va_mode != VNOVAL))
-               error = tmpfs_chmod(vp, vap->va_mode, cred, p);
+               error = tmpfs_chmod(vp, vap->va_mode, cred, l->l_proc);
 
        if (error == 0 && ((vap->va_atime.tv_sec != VNOVAL &&
            vap->va_atime.tv_nsec != VNOVAL) ||
            (vap->va_mtime.tv_sec != VNOVAL &&
            vap->va_mtime.tv_nsec != VNOVAL)))
                error = tmpfs_chtimes(vp, &vap->va_atime, &vap->va_mtime,
-                   vap->va_vaflags, cred, p);
+                   vap->va_vaflags, cred, l);
 
        /* Update the node times.  We give preference to the error codes
         * generated by this function rather than the ones that may arise
@@ -1215,7 +1215,7 @@
 tmpfs_inactive(void *v)
 {
        struct vnode *vp = ((struct vop_inactive_args *)v)->a_vp;
-       struct proc *p = ((struct vop_inactive_args *)v)->a_p;
+       struct lwp *l = ((struct vop_inactive_args *)v)->a_l;
 
        struct tmpfs_node *node;
 
@@ -1226,7 +1226,7 @@
        VOP_UNLOCK(vp, 0);
 
        if (node->tn_links == 0)
-               vrecycle(vp, NULL, p);
+               vrecycle(vp, NULL, l);
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index