diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 418aab098d3f..2cffa3a8e35f 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -523,6 +523,7 @@ zfs_write(znode_t *zp, uio_t *uio, int ioflag, cred_t *cr) ((zp->z_mode & S_ISUID) != 0 && uid == 0)) != 0) { uint64_t newmode; zp->z_mode &= ~(S_ISUID | S_ISGID); + newmode = zp->z_mode; (void) sa_update(zp->z_sa_hdl, SA_ZPL_MODE(zfsvfs), (void *)&newmode, sizeof (uint64_t), tx); }