Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jun 2014 18:25:43 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267825 - head/sys/fs/cuse
Message-ID:  <201406241825.s5OIPhi9065499@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}



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