diff options
author | jhb <jhb@FreeBSD.org> | 2002-02-27 19:18:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-02-27 19:18:10 +0000 |
commit | b8b3ac8816b79f4b10e71029cabb891ae0c33e03 (patch) | |
tree | 42d652ae46be9db4862eef10266827ddea3cb240 /sys/vm | |
parent | 56094fdb72b398e3c7bcf13e638de2b00e5b0197 (diff) | |
download | FreeBSD-src-b8b3ac8816b79f4b10e71029cabb891ae0c33e03.zip FreeBSD-src-b8b3ac8816b79f4b10e71029cabb891ae0c33e03.tar.gz |
Use thread0.td_ucred instead of proc0.p_ucred. This change is cosmetic
and isn't strictly required. However, it lowers the number of false
positives found when grep'ing the kernel sources for p_ucred to ensure
proper locking.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/swap_pager.c | 12 |
1 files changed, 6 insertions, 6 deletions
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) |