diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfsclient/nfs_lock.c | 8 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 2 | ||||
-rw-r--r-- | sys/vm/swap_pager.c | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index 2998463..4726c2c 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -156,7 +156,7 @@ nfs_dolock(struct vop_advlock_args *ap) NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, _PATH_LCKFIFO, td); fmode = FFLAGS(O_WRONLY); - error = vn_open_cred(&nd, &fmode, 0, proc0.p_ucred); + error = vn_open_cred(&nd, &fmode, 0, thread0.td_ucred); if (error != 0) { return (error == ENOENT ? EOPNOTSUPP : error); } @@ -166,10 +166,10 @@ nfs_dolock(struct vop_advlock_args *ap) ioflg = IO_UNIT; for (;;) { - VOP_LEASE(wvp, td, proc0.p_ucred, LEASE_WRITE); + VOP_LEASE(wvp, td, thread0.td_ucred, LEASE_WRITE); error = vn_rdwr(UIO_WRITE, wvp, (caddr_t)&msg, sizeof(msg), 0, - UIO_SYSSPACE, ioflg, proc0.p_ucred, NULL, td); + UIO_SYSSPACE, ioflg, thread0.td_ucred, NULL, td); if (error && (((ioflg & IO_NDELAY) == 0) || error != EAGAIN)) { break; @@ -219,7 +219,7 @@ nfs_dolock(struct vop_advlock_args *ap) break; } - if ((error1 = vn_close(wvp, FWRITE, proc0.p_ucred, td)) && error == 0) + if ((error1 = vn_close(wvp, FWRITE, thread0.td_ucred, td)) && error == 0) return (error1); return (error); diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index f740c9f..fd47219 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -57,7 +57,7 @@ #include <ufs/ffs/fs.h> #include <ufs/ffs/ffs_extern.h> -#define KERNCRED proc0.p_ucred +#define KERNCRED thread0.td_ucred #define DEBUG 1 static int cgaccount __P((int, struct vnode *, struct buf *, int)); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 57f2c9c..0504fed 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1135,8 +1135,8 @@ swap_pager_getpages(object, m, count, reqpage) bp->b_iocmd = BIO_READ; bp->b_iodone = swp_pager_async_iodone; - bp->b_rcred = crhold(proc0.p_ucred); - bp->b_wcred = crhold(proc0.p_ucred); + bp->b_rcred = crhold(thread0.td_ucred); + bp->b_wcred = crhold(thread0.td_ucred); bp->b_data = (caddr_t) kva; bp->b_blkno = blk - (reqpage - i); bp->b_bcount = PAGE_SIZE * (j - i); @@ -1386,8 +1386,8 @@ swap_pager_putpages(object, m, count, sync, rtvals) pmap_qenter((vm_offset_t)bp->b_data, &m[i], n); - bp->b_rcred = crhold(proc0.p_ucred); - bp->b_wcred = crhold(proc0.p_ucred); + bp->b_rcred = crhold(thread0.td_ucred); + bp->b_wcred = crhold(thread0.td_ucred); bp->b_bcount = PAGE_SIZE * n; bp->b_bufsize = PAGE_SIZE * n; bp->b_blkno = blk; @@ -2080,8 +2080,8 @@ getchainbuf(struct bio *bp, struct vnode *vp, int flags) nbp->b_iocmd = bp->bio_cmd; nbp->b_ioflags = 0; nbp->b_flags = flags; - nbp->b_rcred = crhold(proc0.p_ucred); - nbp->b_wcred = crhold(proc0.p_ucred); + nbp->b_rcred = crhold(thread0.td_ucred); + nbp->b_wcred = crhold(thread0.td_ucred); nbp->b_iodone = vm_pager_chain_iodone; if (vp) |