summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs/devfs_devs.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-08-09 20:53:33 +0000
committerkib <kib@FreeBSD.org>2011-08-09 20:53:33 +0000
commit3f15a4a91bc22ed5ec076af6d002b862eb2a25be (patch)
tree5ce01445eaa87e60c9f15ae404aa2c03832de12b /sys/fs/devfs/devfs_devs.c
parentc8b888eaca6dfe777f7f43a7e765122c7b8e650b (diff)
downloadFreeBSD-src-3f15a4a91bc22ed5ec076af6d002b862eb2a25be.zip
FreeBSD-src-3f15a4a91bc22ed5ec076af6d002b862eb2a25be.tar.gz
Do not update mountpoint generation counter to the value which was not
yet acted upon by devfs_populate(). Submitted by: Kohji Okuno <okuno.kohji jp panasonic com> Approved by: re (bz) MFC after: 1 week
Diffstat (limited to 'sys/fs/devfs/devfs_devs.c')
-rw-r--r--sys/fs/devfs/devfs_devs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index d72ada0..a2d3222 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -630,13 +630,15 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup)
void
devfs_populate(struct devfs_mount *dm)
{
+ unsigned gen;
sx_assert(&dm->dm_lock, SX_XLOCKED);
- if (dm->dm_generation == devfs_generation)
+ gen = devfs_generation;
+ if (dm->dm_generation == gen)
return;
while (devfs_populate_loop(dm, 0))
continue;
- dm->dm_generation = devfs_generation;
+ dm->dm_generation = gen;
}
/*
OpenPOWER on IntegriCloud