]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Keep dirhash tailq locked throughout the entirety of ufsdirhash_destroy() to fix
authorSean Nicholas Barkas <snb@FreeBSD.org>
Wed, 17 Jun 2009 18:55:29 +0000 (18:55 +0000)
committerSean Nicholas Barkas <snb@FreeBSD.org>
Wed, 17 Jun 2009 18:55:29 +0000 (18:55 +0000)
commitfe1bd0a4837e6c795052bad1b059d20a581ad737
treea616f7247108a111e6bbaafa2b1b787090fa9e5c
parent8ee45544b25ea6d5e14e4965daf0c7825eee374a
Keep dirhash tailq locked throughout the entirety of ufsdirhash_destroy() to fix
a potential race pointed out by pjd. Also use TAILQ_FOREACH_SAFE to iterate over
dirhashes in ufsdirhash_lowmem(), so that we can continue iterating even after a
dirhash is destroyed.

Suggested by: pjd
Tested by:      pho
Approved by: dwmalone (mentor)
sys/ufs/ufs/ufs_dirhash.c