diff options
author | jhb <jhb@FreeBSD.org> | 2001-10-11 23:38:17 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-10-11 23:38:17 +0000 |
commit | 4806d88677d2a333254f9fc33d4e119cc56bb002 (patch) | |
tree | d3ca87a8ac917d5003235cc737cd5f76591f7c1b /sys/kern/vfs_cluster.c | |
parent | 9f68054d87b5538c76f0b802ef8f7344eedd5647 (diff) | |
download | FreeBSD-src-4806d88677d2a333254f9fc33d4e119cc56bb002.zip FreeBSD-src-4806d88677d2a333254f9fc33d4e119cc56bb002.tar.gz |
Change the kernel's ucred API as follows:
- crhold() returns a reference to the ucred whose refcount it bumps.
- crcopy() now simply copies the credentials from one credential to
another and has no return value.
- a new crshared() primitive is added which returns true if a ucred's
refcount is > 1 and false (0) otherwise.
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r-- | sys/kern/vfs_cluster.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index b685740..1960c28 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -774,10 +774,8 @@ cluster_wbuild(vp, size, start_lbn, len) bp->b_op = tbp->b_op; bp->b_bufsize = 0; bp->b_npages = 0; - if (tbp->b_wcred != NOCRED) { - bp->b_wcred = tbp->b_wcred; - crhold(bp->b_wcred); - } + if (tbp->b_wcred != NOCRED) + bp->b_wcred = crhold(tbp->b_wcred); bp->b_blkno = tbp->b_blkno; bp->b_lblkno = tbp->b_lblkno; |