From 698b28701498cf0ab39073ad9e2f188726845aab Mon Sep 17 00:00:00 2001 From: mjg Date: Sun, 5 Oct 2014 02:16:53 +0000 Subject: [PATCH] Get rid of crshared. --- sys/kern/kern_prot.c | 12 +----------- sys/sys/ucred.h | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 7552363ac520..fd2b7f4021f8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1883,16 +1883,6 @@ crfree(struct ucred *cr) } } -/* - * Check to see if this ucred is shared. - */ -int -crshared(struct ucred *cr) -{ - - return (cr->cr_ref > 1); -} - /* * Copy a ucred's contents from a template. Does not block. */ @@ -1900,7 +1890,7 @@ void crcopy(struct ucred *dest, struct ucred *src) { - KASSERT(crshared(dest) == 0, ("crcopy of shared ucred")); + KASSERT(dest->cr_ref == 1, ("crcopy of shared ucred")); bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index e1648d4b3649..81e45209b223 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -108,7 +108,6 @@ void cred_update_thread(struct thread *td); void crfree(struct ucred *cr); struct ucred *crget(void); struct ucred *crhold(struct ucred *cr); -int crshared(struct ucred *cr); void cru2x(struct ucred *cr, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); int groupmember(gid_t gid, struct ucred *cred);