Date: Wed, 17 Sep 2014 19:37:58 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271721 - head/lib/libgeom Message-ID: <201409171937.s8HJbwYf031032@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Sep 17 19:37:58 2014 New Revision: 271721 URL: http://svnweb.freebsd.org/changeset/base/271721 Log: Explicitly specify MAP_SHARED when mapping the stats file descriptor. Reviewed by: kib MFC after: 1 week Modified: head/lib/libgeom/geom_stats.c Modified: head/lib/libgeom/geom_stats.c ============================================================================== --- head/lib/libgeom/geom_stats.c Wed Sep 17 19:09:58 2014 (r271720) +++ head/lib/libgeom/geom_stats.c Wed Sep 17 19:37:58 2014 (r271721) @@ -68,7 +68,7 @@ geom_stats_resync(void) return; for (;;) { p = mmap(statp, (npages + 1) * pagesize, - PROT_READ, 0, statsfd, 0); + PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) break; else @@ -90,7 +90,7 @@ geom_stats_open(void) return (errno); pagesize = getpagesize(); spp = pagesize / sizeof(struct devstat); - p = mmap(NULL, pagesize, PROT_READ, 0, statsfd, 0); + p = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) { error = errno; close(statsfd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409171937.s8HJbwYf031032>