From owner-svn-src-all@FreeBSD.ORG Sun Oct 5 02:16:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C452E35; Sun, 5 Oct 2014 02:16:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A14AFC8; Sun, 5 Oct 2014 02:16:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s952GsBb072185; Sun, 5 Oct 2014 02:16:54 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s952Gr8R072183; Sun, 5 Oct 2014 02:16:53 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410050216.s952Gr8R072183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 5 Oct 2014 02:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272546 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2014 02:16:54 -0000 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);