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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to