FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr

It happens to trip over an assert but does not matter for correctness at
this time. Done for future proofing.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #11884
This commit is contained in:
Mateusz Guzik 2021-04-12 19:59:57 +02:00 committed by Brian Behlendorf
parent 4568b5cfba
commit a6b82cc0bb
1 changed files with 2 additions and 0 deletions

View File

@ -2756,7 +2756,9 @@ zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr)
err = zfs_acl_chown_setattr(zp); err = zfs_acl_chown_setattr(zp);
ASSERT(err == 0); ASSERT(err == 0);
if (attrzp) { if (attrzp) {
vn_seqc_write_begin(ZTOV(attrzp));
err = zfs_acl_chown_setattr(attrzp); err = zfs_acl_chown_setattr(attrzp);
vn_seqc_write_end(ZTOV(attrzp));
ASSERT(err == 0); ASSERT(err == 0);
} }
} }