summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c4
-rw-r--r--sys/fs/coda/coda_vfsops.c4
-rw-r--r--sys/fs/fifofs/fifo_vnops.c4
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c6
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c2
-rw-r--r--sys/fs/nwfs/nwfs_io.c8
-rw-r--r--sys/fs/nwfs/nwfs_node.c2
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c8
-rw-r--r--sys/fs/portalfs/portal_vnops.c4
-rw-r--r--sys/fs/smbfs/smbfs_io.c6
-rw-r--r--sys/fs/smbfs/smbfs_node.c2
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c8
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c3
-rw-r--r--sys/fs/specfs/spec_vnops.c8
-rw-r--r--sys/fs/unionfs/union_subr.c6
-rw-r--r--sys/fs/unionfs/union_vfsops.c2
17 files changed, 39 insertions, 40 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index 5d7ff1b..1e3719d 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -236,7 +236,7 @@ cd9660_mount(mp, path, data, ndp, td)
*/
accessmode = VREAD;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
- error = VOP_ACCESS(devvp, accessmode, td->td_proc->p_ucred, td);
+ error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
if (error)
error = suser_td(td);
if (error) {
@@ -305,7 +305,7 @@ iso_mountfs(devvp, mp, td, argp)
return error;
if (vcount(devvp) > 1 && devvp != rootvp)
return EBUSY;
- if ((error = vinvalbuf(devvp, V_SAVE, td->td_proc->p_ucred, td, 0, 0)))
+ if ((error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0)))
return (error);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 275b036..5d5a810 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -317,7 +317,7 @@ coda_root(vfsp, vpp)
}
}
- error = venus_root(vftomi(vfsp), p->p_ucred, p, &VFid);
+ error = venus_root(vftomi(vfsp), td->td_ucred, p, &VFid);
if (!error) {
/*
@@ -457,7 +457,7 @@ coda_fhtovp(vfsp, fhp, nam, vpp, exflagsp, creadanonp)
return(0);
}
- error = venus_fhtovp(vftomi(vfsp), &cfid->cfid_fid, p->p_ucred, p, &VFid, &vtype);
+ error = venus_fhtovp(vftomi(vfsp), &cfid->cfid_fid, td->td_ucred, p, &VFid, &vtype);
if (error) {
CODADEBUG(CODA_VGET, myprintf(("vget error %d\n",error));)
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c
index 3699f96..8153670 100644
--- a/sys/fs/fifofs/fifo_vnops.c
+++ b/sys/fs/fifofs/fifo_vnops.c
@@ -176,7 +176,7 @@ fifo_open(ap)
MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, M_WAITOK);
vp->v_fifoinfo = fip;
error = socreate(AF_LOCAL, &rso, SOCK_STREAM, 0,
- ap->a_td->td_proc->p_ucred, ap->a_td);
+ ap->a_td->td_ucred, ap->a_td);
if (error) {
free(fip, M_VNODE);
vp->v_fifoinfo = NULL;
@@ -184,7 +184,7 @@ fifo_open(ap)
}
fip->fi_readsock = rso;
error = socreate(AF_LOCAL, &wso, SOCK_STREAM, 0,
- ap->a_td->td_proc->p_ucred, ap->a_td);
+ ap->a_td->td_ucred, ap->a_td);
if (error) {
(void)soclose(rso);
free(fip, M_VNODE);
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index c3226e6..dcb5995 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -239,7 +239,7 @@ hpfs_mountfs(devvp, mp, argsp, td)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
- error = vinvalbuf(devvp, V_SAVE, td->td_proc->p_ucred, td, 0, 0);
+ error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0);
VOP_UNLOCK(devvp, 0, td);
if (error)
return (error);
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index de7668d..622d7d0 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -199,7 +199,7 @@ msdosfs_mount(mp, path, data, ndp, td)
devvp = pmp->pm_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
- td->td_proc->p_ucred, td);
+ td->td_ucred, td);
if (error) {
VOP_UNLOCK(devvp, 0, td);
return (error);
@@ -247,7 +247,7 @@ msdosfs_mount(mp, path, data, ndp, td)
if ((mp->mnt_flag & MNT_RDONLY) == 0)
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
- error = VOP_ACCESS(devvp, accessmode, td->td_proc->p_ucred, td);
+ error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
if (error) {
vput(devvp);
return (error);
@@ -315,7 +315,7 @@ mountmsdosfs(devvp, mp, td, argp)
if (vcount(devvp) > 1 && devvp != rootvp)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
- error = vinvalbuf(devvp, V_SAVE, td->td_proc->p_ucred, td, 0, 0);
+ error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0);
VOP_UNLOCK(devvp, 0, td);
if (error)
return (error);
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index 2a58601..712d4d3 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -294,7 +294,7 @@ ntfs_mountfs(devvp, mp, argsp, td)
if (ncount > 1 && devvp != rootvp)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
- error = vinvalbuf(devvp, V_SAVE, td->td_proc->p_ucred, td, 0, 0);
+ error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0);
VOP_UNLOCK(devvp, 0, td);
if (error)
return (error);
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c
index e3772f0..ff33fc3 100644
--- a/sys/fs/nwfs/nwfs_io.c
+++ b/sys/fs/nwfs/nwfs_io.c
@@ -407,8 +407,8 @@ nwfs_getpages(ap)
vm_page_t *pages;
vp = ap->a_vp;
- td = curthread; /* XXX */
- cred = curproc->p_ucred; /* XXX */
+ td = curthread; /* XXX */
+ cred = td->td_ucred; /* XXX */
np = VTONW(vp);
nmp = VFSTONWFS(vp->v_mount);
pages = ap->a_m;
@@ -517,7 +517,7 @@ nwfs_putpages(ap)
#ifndef NWFS_RWCACHE
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
VOP_OPEN(vp, FWRITE, cred, td);
error = vop_stdputpages(ap);
VOP_CLOSE(vp, FWRITE, cred, td);
@@ -534,7 +534,7 @@ nwfs_putpages(ap)
vm_page_t *pages;
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
/* VOP_OPEN(vp, FWRITE, cred, td);*/
np = VTONW(vp);
nmp = VFSTONWFS(vp->v_mount);
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c
index d6f8788..d8693fa 100644
--- a/sys/fs/nwfs/nwfs_node.c
+++ b/sys/fs/nwfs/nwfs_node.c
@@ -287,7 +287,7 @@ nwfs_inactive(ap)
} */ *ap;
{
struct thread *td = ap->a_td;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
struct vnode *vp = ap->a_vp;
struct nwnode *np = VTONW(vp);
int error;
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index 119a163..490f861 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -169,7 +169,7 @@ static int nwfs_mount(struct mount *mp, char *path, caddr_t data,
nwfs_printf("mount version mismatch: kernel=%d, mount=%d\n",NWFS_VERSION,args.version);
return (1);
}
- error = ncp_conn_getbyref(args.connRef, td , td->td_proc->p_ucred,NCPM_EXECUTE,&conn);
+ error = ncp_conn_getbyref(args.connRef, td , td->td_ucred,NCPM_EXECUTE,&conn);
if (error) {
nwfs_printf("invalid connection refernce %d\n",args.connRef);
return (error);
@@ -249,7 +249,7 @@ nwfs_unmount(struct mount *mp, int mntflags, struct thread *td)
return (error);
conn = NWFSTOCONN(nmp);
ncp_conn_puthandle(nmp->connh,NULL,0);
- if (ncp_conn_lock(conn, td, td->td_proc->p_ucred,NCPM_WRITE | NCPM_EXECUTE) == 0) {
+ if (ncp_conn_lock(conn, td, td->td_ucred,NCPM_WRITE | NCPM_EXECUTE) == 0) {
if(ncp_conn_free(conn))
ncp_conn_unlock(conn, td);
}
@@ -270,7 +270,7 @@ nwfs_root(struct mount *mp, struct vnode **vpp) {
struct ncp_conn *conn;
struct nw_entry_info fattr;
struct thread *td = curthread;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
int error, nsf, opt;
u_char vol;
@@ -431,7 +431,7 @@ nwfs_statfs(mp, sbp, td)
if (np == NULL) return EINVAL;
error = ncp_get_volume_info_with_number(NWFSTOCONN(nmp),
- nmp->n_volume, &vi, td, td->td_proc->p_ucred);
+ nmp->n_volume, &vi, td, td->td_ucred);
if (error) return error;
secsize = 512; /* XXX how to get real value ??? */
sbp->f_spare2=0; /* placeholder */
diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c
index a7d9832..934cf97 100644
--- a/sys/fs/portalfs/portal_vnops.c
+++ b/sys/fs/portalfs/portal_vnops.c
@@ -246,8 +246,8 @@ portal_open(ap)
/*
* Create a new socket.
*/
- error = socreate(AF_UNIX, &so, SOCK_STREAM, 0,
- ap->a_td->td_proc->p_ucred, ap->a_td);
+ error = socreate(AF_UNIX, &so, SOCK_STREAM, 0, ap->a_td->td_ucred,
+ ap->a_td);
if (error)
goto bad;
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index c7d337e..62290be 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -429,7 +429,7 @@ smbfs_getpages(ap)
vp = ap->a_vp;
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
np = VTOSMB(vp);
smp = VFSTOSMBFS(vp->v_mount);
pages = ap->a_m;
@@ -549,7 +549,7 @@ smbfs_putpages(ap)
#ifdef SMBFS_RWGENERIC
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
VOP_OPEN(vp, FWRITE, cred, td);
error = vop_stdputpages(ap);
VOP_CLOSE(vp, FWRITE, cred, td);
@@ -567,7 +567,7 @@ smbfs_putpages(ap)
vm_page_t *pages;
td = curthread; /* XXX */
- cred = td->td_proc->p_ucred; /* XXX */
+ cred = td->td_ucred; /* XXX */
/* VOP_OPEN(vp, FWRITE, cred, td);*/
np = VTOSMB(vp);
smp = VFSTOSMBFS(vp->v_mount);
diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c
index f170b1d..8dabd00 100644
--- a/sys/fs/smbfs/smbfs_node.c
+++ b/sys/fs/smbfs/smbfs_node.c
@@ -337,7 +337,7 @@ smbfs_inactive(ap)
} */ *ap;
{
struct thread *td = ap->a_td;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
struct vnode *vp = ap->a_vp;
struct smbnode *np = VTOSMB(vp);
struct smb_cred scred;
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index eff50e3..b3b5cd3 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -166,7 +166,7 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data,
SMBFS_VERSION, args.version);
return EINVAL;
}
- smb_makescred(&scred, td, td->td_proc->p_ucred);
+ smb_makescred(&scred, td, td->td_ucred);
error = smb_dev2share(args.dev, SMBM_EXEC, &scred, &ssp);
if (error) {
printf("invalid device handle %d (%d)\n", args.dev, error);
@@ -267,7 +267,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td)
error = vflush(mp, 1, flags);
if (error)
return error;
- smb_makescred(&scred, td, td->td_proc->p_ucred);
+ smb_makescred(&scred, td, td->td_ucred);
smb_share_put(smp->sm_share, &scred);
mp->mnt_data = (qaddr_t)0;
@@ -294,7 +294,7 @@ smbfs_root(struct mount *mp, struct vnode **vpp)
struct smbnode *np;
struct smbfattr fattr;
struct thread *td = curthread;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
struct smb_cred scred;
int error;
@@ -399,7 +399,7 @@ smbfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
sbp->f_iosize = SSTOVC(ssp)->vc_txmax; /* optimal transfer block size */
sbp->f_spare2 = 0; /* placeholder */
- smb_makescred(&scred, td, td->td_proc->p_ucred);
+ smb_makescred(&scred, td, td->td_ucred);
if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0)
error = smbfs_smb_statfs2(ssp, sbp, &scred);
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index 392468e..d01dc42 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -976,7 +976,6 @@ smbfs_advlock(ap)
caddr_t id = (caddr_t)1 /* ap->a_id */;
/* int flags = ap->a_flags;*/
struct thread *td = curthread;
- struct proc *p = td ? td->td_proc : NULL;
struct smb_cred scred;
u_quad_t size;
off_t start, end, oadd;
@@ -1027,7 +1026,7 @@ smbfs_advlock(ap)
return EOVERFLOW;
end = start + oadd;
}
- smb_makescred(&scred, td, p ? p->p_ucred : NULL);
+ smb_makescred(&scred, td, td->td_ucred);
switch (ap->a_op) {
case F_SETLK:
switch (fl->l_type) {
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 7887ddb..6c4fcd9 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -177,7 +177,7 @@ spec_open(ap)
* When running in secure mode, do not allow opens
* for writing if the disk is mounted.
*/
- error = securelevel_ge(td->td_proc->p_ucred, 1);
+ error = securelevel_ge(td->td_ucred, 1);
if (error && vfs_mountedon(vp))
return (error);
@@ -185,7 +185,7 @@ spec_open(ap)
* When running in very secure mode, do not allow
* opens for writing of any disks.
*/
- error = securelevel_ge(td->td_proc->p_ucred, 2);
+ error = securelevel_ge(td->td_ucred, 2);
if (error)
return (error);
}
@@ -729,8 +729,8 @@ spec_getpages(ap)
/* B_PHYS is not set, but it is nice to fill this in. */
KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred"));
KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred"));
- bp->b_rcred = crhold(curthread->td_proc->p_ucred);
- bp->b_wcred = crhold(curthread->td_proc->p_ucred);
+ bp->b_rcred = crhold(curthread->td_ucred);
+ bp->b_wcred = crhold(curthread->td_ucred);
bp->b_blkno = blkno;
bp->b_lblkno = blkno;
pbgetvp(ap->a_vp, bp);
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index 70a9f52..fde7df5 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -1011,7 +1011,7 @@ union_mkwhiteout(um, dvp, cnp, path)
}
/* VOP_LEASE: dvp is locked */
- VOP_LEASE(dvp, td, td->td_proc->p_ucred, LEASE_WRITE);
+ VOP_LEASE(dvp, td, td->td_ucred, LEASE_WRITE);
error = VOP_WHITEOUT(dvp, &cn, CREATE);
if (cn.cn_flags & HASBUF) {
@@ -1043,7 +1043,7 @@ union_vn_create(vpp, un, td)
struct thread *td;
{
struct vnode *vp;
- struct ucred *cred = td->td_proc->p_ucred;
+ struct ucred *cred = td->td_ucred;
struct vattr vat;
struct vattr *vap = &vat;
int fmode = FFLAGS(O_WRONLY|O_CREAT|O_TRUNC|O_EXCL);
@@ -1071,7 +1071,7 @@ union_vn_create(vpp, un, td)
cn.cn_nameiop = CREATE;
cn.cn_flags = (LOCKPARENT|LOCKLEAF|HASBUF|SAVENAME|ISLASTCN);
cn.cn_thread = td;
- cn.cn_cred = td->td_proc->p_ucred;
+ cn.cn_cred = td->td_ucred;
cn.cn_nameptr = cn.cn_pnbuf;
cn.cn_consume = 0;
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index 92f46d5..58f283b 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -223,7 +223,7 @@ union_mount(mp, path, data, ndp, td)
goto bad;
}
- um->um_cred = crhold(td->td_proc->p_ucred);
+ um->um_cred = crhold(td->td_ucred);
FILEDESC_LOCK(td->td_proc->p_fd);
um->um_cmode = UN_DIRMODE &~ td->td_proc->p_fd->fd_cmask;
FILEDESC_UNLOCK(td->td_proc->p_fd);
OpenPOWER on IntegriCloud