Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Oct 2014 02:16:53 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272546 - in head/sys: kern sys
Message-ID:  <201410050216.s952Gr8R072183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sun Oct  5 02:16:53 2014
New Revision: 272546
URL: https://svnweb.freebsd.org/changeset/base/272546

Log:
  Get rid of crshared.

Modified:
  head/sys/kern/kern_prot.c
  head/sys/sys/ucred.h

Modified: head/sys/kern/kern_prot.c
==============================================================================
--- head/sys/kern/kern_prot.c	Sun Oct  5 01:28:21 2014	(r272545)
+++ head/sys/kern/kern_prot.c	Sun Oct  5 02:16:53 2014	(r272546)
@@ -1884,23 +1884,13 @@ 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.
  */
 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));

Modified: head/sys/sys/ucred.h
==============================================================================
--- head/sys/sys/ucred.h	Sun Oct  5 01:28:21 2014	(r272545)
+++ head/sys/sys/ucred.h	Sun Oct  5 02:16:53 2014	(r272546)
@@ -108,7 +108,6 @@ void	cred_update_thread(struct thread *t
 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410050216.s952Gr8R072183>