mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Fix zfs_xattr_owner_unlinked on FreeBSD and comment
Explain FreeBSD VFS' unfortunate idiosyncratic locking requirements. There is no functional change for other platforms. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9720
This commit is contained in:
committed by
Brian Behlendorf
parent
ddb4e69db5
commit
ba434b18ec
@@ -232,7 +232,13 @@ zfs_xattr_owner_unlinked(znode_t *zp)
|
||||
int unlinked = 0;
|
||||
znode_t *dzp;
|
||||
|
||||
/*
|
||||
* zrele drops the vnode lock which violates the VOP locking contract
|
||||
* on FreeBSD. See comment at the top of zfs_replay.c for more detail.
|
||||
*/
|
||||
#ifndef __FreeBSD__
|
||||
zhold(zp);
|
||||
#endif
|
||||
/*
|
||||
* if zp is XATTR node, keep walking up via z_xattr_parent until we
|
||||
* get the owner
|
||||
@@ -247,7 +253,9 @@ zfs_xattr_owner_unlinked(znode_t *zp)
|
||||
zp = dzp;
|
||||
unlinked = zp->z_unlinked;
|
||||
}
|
||||
#ifndef __FreeBSD__
|
||||
zrele(zp);
|
||||
#endif
|
||||
return (unlinked);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user