From owner-svn-src-stable@freebsd.org Thu Mar 16 06:03:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C2E4D0EF2E; Thu, 16 Mar 2017 06:03:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 28E7C12CC; Thu, 16 Mar 2017 06:03:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2G63R7j069956; Thu, 16 Mar 2017 06:03:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2G63R9x069955; Thu, 16 Mar 2017 06:03:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201703160603.v2G63R9x069955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 16 Mar 2017 06:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315372 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 06:03:28 -0000 Author: mjg Date: Thu Mar 16 06:03:27 2017 New Revision: 315372 URL: https://svnweb.freebsd.org/changeset/base/315372 Log: MFC r313260: fd: switch fget_unlocked to atomic_fcmpse Modified: stable/11/sys/kern/kern_descrip.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_descrip.c ============================================================================== --- stable/11/sys/kern/kern_descrip.c Thu Mar 16 06:00:27 2017 (r315371) +++ stable/11/sys/kern/kern_descrip.c Thu Mar 16 06:03:27 2017 (r315372) @@ -2567,8 +2567,8 @@ fget_unlocked(struct filedesc *fdp, int if (error != 0) return (error); #endif - retry: count = fp->f_count; + retry: if (count == 0) { /* * Force a reload. Other thread could reallocate the @@ -2582,7 +2582,7 @@ fget_unlocked(struct filedesc *fdp, int * Use an acquire barrier to force re-reading of fdt so it is * refreshed for verification. */ - if (atomic_cmpset_acq_int(&fp->f_count, count, count + 1) == 0) + if (atomic_fcmpset_acq_int(&fp->f_count, &count, count + 1) == 0) goto retry; fdt = fdp->fd_files; #ifdef CAPABILITIES