diff options
author | kib <kib@FreeBSD.org> | 2011-08-09 20:53:33 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-08-09 20:53:33 +0000 |
commit | 3f15a4a91bc22ed5ec076af6d002b862eb2a25be (patch) | |
tree | 5ce01445eaa87e60c9f15ae404aa2c03832de12b /sys/fs/devfs/devfs_devs.c | |
parent | c8b888eaca6dfe777f7f43a7e765122c7b8e650b (diff) | |
download | FreeBSD-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.c | 6 |
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; } /* |