From owner-svn-src-head@FreeBSD.ORG Tue Jun 24 18:25:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFC1D93E; Tue, 24 Jun 2014 18:25:43 +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 BC91A2984; Tue, 24 Jun 2014 18:25:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5OIPhFZ065500; Tue, 24 Jun 2014 18:25:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5OIPhi9065499; Tue, 24 Jun 2014 18:25:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406241825.s5OIPhi9065499@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 24 Jun 2014 18:25:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267825 - head/sys/fs/cuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 18:25:43 -0000 Author: hselasky Date: Tue Jun 24 18:25:43 2014 New Revision: 267825 URL: http://svnweb.freebsd.org/changeset/base/267825 Log: Use existing PHOLD() and PRELE() macros. Submitted by: kib @ Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Tue Jun 24 16:10:48 2014 (r267824) +++ head/sys/fs/cuse/cuse.c Tue Jun 24 18:25:43 2014 (r267825) @@ -813,15 +813,9 @@ cuse_proc2proc_copy(struct proc *proc_s, .uio_td = td, }; - PROC_LOCK(proc_s); - _PHOLD(proc_s); - PROC_UNLOCK(proc_s); - + PHOLD(proc_s); error = proc_rwmem(proc_s, &uio); - - PROC_LOCK(proc_s); - _PRELE(proc_s); - PROC_UNLOCK(proc_s); + PRELE(proc_s); } else if (proc_cur == proc_s) { struct iovec iov = { @@ -838,15 +832,9 @@ cuse_proc2proc_copy(struct proc *proc_s, .uio_td = td, }; - PROC_LOCK(proc_d); - _PHOLD(proc_d); - PROC_UNLOCK(proc_d); - + PHOLD(proc_d); error = proc_rwmem(proc_d, &uio); - - PROC_LOCK(proc_d); - _PRELE(proc_d); - PROC_UNLOCK(proc_d); + PRELE(proc_d); } else { error = EINVAL; }