Date: Thu, 16 Mar 2017 06:03:27 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> 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 Message-ID: <201703160603.v2G63R9x069955@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703160603.v2G63R9x069955>