freebsd-skq/sys/ufs
kib 153d3ae3ae Fix livelock in ufsdirhash_create().
When more than one thread enters ufsdirhash_create() for the same
directory and the inode dirhash is instantiated, but the dirhash' hash
is not, all of them lock the dirhash shared and then try to upgrade.
Since there are several threads owning the lock shared, upgrade fails
and the same attempt is repeated, ad infinitum.

To break the lockstep, lock the dirhash in exclusive mode after the
failed try-upgrade.

Reported and tested by:	pho
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2017-12-07 09:05:34 +00:00
..
ffs sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ufs Fix livelock in ufsdirhash_create(). 2017-12-07 09:05:34 +00:00