mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
FreeBSD: Don't remove SA xattr if not SA znode
We attempt to remove an existing SA xattr when setting a dir xattr, but this only makes sense if the znode has been upgraded to the SA format. Otherwise, we will hit an assert in zfs_sa_get_xattr. Make sure this is an SA znode before attempting to remove the SA xattr. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #12514
This commit is contained in:
parent
b1a1c64313
commit
3b89d9518d
@ -5695,7 +5695,7 @@ zfs_setextattr(struct vop_setextattr_args *ap)
|
|||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
error = zfs_setextattr_dir(ap, attrname);
|
error = zfs_setextattr_dir(ap, attrname);
|
||||||
if (error == 0)
|
if (error == 0 && zp->z_is_sa)
|
||||||
/*
|
/*
|
||||||
* Successfully put into dir, we need to clear the one
|
* Successfully put into dir, we need to clear the one
|
||||||
* in SA if present.
|
* in SA if present.
|
||||||
|
Loading…
Reference in New Issue
Block a user