Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/ufs/ufs_vnops.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/ufs/ufs_vnops.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.102.2.5 retrieving revision 1.102.2.6 diff -u -p -r1.102.2.5 -r1.102.2.6 --- src/sys/ufs/ufs/ufs_vnops.c 2004/09/18 14:56:59 1.102.2.5 +++ src/sys/ufs/ufs/ufs_vnops.c 2004/09/21 13:39:23 1.102.2.6 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_vnops.c,v 1.102.2.5 2004/09/18 14:56:59 skrll Exp $ */ +/* $NetBSD: ufs_vnops.c,v 1.102.2.6 2004/09/21 13:39:23 skrll Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993, 1995 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.102.2.5 2004/09/18 14:56:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.102.2.6 2004/09/21 13:39:23 skrll Exp $"); #ifndef _LKM #include "opt_quota.h" @@ -181,7 +181,7 @@ ufs_open(void *v) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct proc *a_p; + struct proc *a_l; } */ *ap = v; /* @@ -206,7 +206,7 @@ ufs_close(void *v) struct vnode *a_vp; int a_fflag; struct ucred *a_cred; - struct proc *a_p; + struct proc *a_l; } */ *ap = v; struct vnode *vp; struct inode *ip; @@ -359,20 +359,20 @@ ufs_setattr(void *v) struct vnode *a_vp; struct vattr *a_vap; struct ucred *a_cred; - struct proc *a_p; + struct lwp *a_l; } */ *ap = v; struct vattr *vap; struct vnode *vp; struct inode *ip; struct ucred *cred; - struct proc *p; + struct lwp *l; int error; vap = ap->a_vap; vp = ap->a_vp; ip = VTOI(vp); cred = ap->a_cred; - p = ap->a_p; + l = ap->a_l; /* * Check for unsettable attributes. @@ -387,7 +387,7 @@ ufs_setattr(void *v) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); if (cred->cr_uid != ip->i_uid && - (error = suser(cred, &p->p_acflag))) + (error = suser(cred, &l->l_proc->p_acflag))) return (error); if (cred->cr_uid == 0) { if ((ip->i_flags & (SF_IMMUTABLE | SF_APPEND)) && @@ -422,7 +422,7 @@ ufs_setattr(void *v) if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) { if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); - error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, p); + error = ufs_chown(vp, vap->va_uid, vap->va_gid, cred, l->l_proc); if (error) return (error); } @@ -445,7 +445,7 @@ ufs_setattr(void *v) default: break; } - error = VOP_TRUNCATE(vp, vap->va_size, 0, cred, p); + error = VOP_TRUNCATE(vp, vap->va_size, 0, cred, l); if (error) return (error); } @@ -457,9 +457,9 @@ ufs_setattr(void *v) if ((ip->i_flags & SF_SNAPSHOT) != 0) return (EPERM); if (cred->cr_uid != ip->i_uid && - (error = suser(cred, &p->p_acflag)) && + (error = suser(cred, &l->l_proc->p_acflag)) && ((vap->va_vaflags & VA_UTIMES_NULL) == 0 || - (error = VOP_ACCESS(vp, VWRITE, cred, p)))) + (error = VOP_ACCESS(vp, VWRITE, cred, l)))) return (error); if (vap->va_atime.tv_sec != VNOVAL) if (!(vp->v_mount->mnt_flag & MNT_NOATIME)) @@ -483,7 +483,7 @@ ufs_setattr(void *v) (vap->va_mode & (S_IXUSR | S_IWUSR | S_IXGRP | S_IWGRP | S_IXOTH | S_IWOTH))) return (EPERM); - error = ufs_chmod(vp, (int)vap->va_mode, cred, p); + error = ufs_chmod(vp, (int)vap->va_mode, cred, l->l_proc); } VN_KNOTE(vp, NOTE_ATTRIB); return (error); @@ -976,7 +976,7 @@ ufs_rename(void *v) * to namei, as the parent directory is unlocked by the * call to checkpath(). */ - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc); + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_lwp); VOP_UNLOCK(fvp, 0); if (oldparent != dp->i_number) newparent = dp->i_number; @@ -986,7 +986,7 @@ ufs_rename(void *v) if (xp != NULL) vput(tvp); vref(tdvp); /* compensate for the ref checkpath looses */ - if ((error = ufs_checkpath(ip, dp, tcnp->cn_cred)) != 0) { + if ((error = ufs_checkpath(ip, dp, tcnp->cn_cred, tcnp->cn_lwp)) != 0) { vrele(tdvp); goto out; } @@ -1129,7 +1129,7 @@ ufs_rename(void *v) DIP_ASSIGN(xp, nlink, xp->i_nlink); xp->i_flag |= IN_CHANGE; if ((error = VOP_TRUNCATE(tvp, (off_t)0, IO_SYNC, - tcnp->cn_cred, tcnp->cn_proc))) + tcnp->cn_cred, tcnp->cn_lwp))) goto bad; } VN_KNOTE(tdvp, NOTE_WRITE); @@ -1494,7 +1494,7 @@ ufs_rmdir(void *v) DIP_ASSIGN(ip, nlink, ip->i_nlink); ip->i_flag |= IN_CHANGE; error = VOP_TRUNCATE(vp, (off_t)0, IO_SYNC, cnp->cn_cred, - cnp->cn_proc); + cnp->cn_lwp); } cache_purge(vp); out: