freebsd-dev/sys/cddl/contrib/opensolaris
Andriy Gapon d26312a4e4 fix vnode lock assertion for extended attributes directory
Background.  In ZFS a file with extended attributes has a special
directory associated with it where each extended attribute is a file.
The attribute's name is a file name and its value is a file content.
When the ownership of a file with extended attributes is changed, ZFS
also changes ownership of the special directory.  This is where the bug
was hit.

The bug was introduced in r209158.

Nota bene.  ZFS vnode locks are typically acquired before
z_teardown_lock (i.e., before ZFS_ENTER).  But this is not the case for
the vnodes that represent the extended attribute directory and files.
Those are always locked after ZFS_ENTER.  This is confusing and fragile.

PR:		212702
Reported by:	Christian Fuss to FreeNAS
Tested by:	mav
MFC after:	1 week
2016-09-24 08:13:15 +00:00
..
common MFV r302662: 6447 handful of nvpair cleanups 2016-09-01 15:17:39 +00:00
uts fix vnode lock assertion for extended attributes directory 2016-09-24 08:13:15 +00:00
OPENSOLARIS.LICENSE