diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c index c30ce1c98..98378109c 100644 --- a/module/os/linux/zfs/zpl_xattr.c +++ b/module/os/linux/zfs/zpl_xattr.c @@ -1001,7 +1001,7 @@ zpl_set_acl_impl(struct inode *ip, struct posix_acl *acl, int type) * the inode to write the Posix mode bits. */ if (ip->i_mode != mode) { - ip->i_mode = mode; + ip->i_mode = ITOZ(ip)->z_mode = mode; ip->i_ctime = current_time(ip); zfs_mark_inode_dirty(ip); } @@ -1148,7 +1148,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir) if (IS_ERR(acl)) return (PTR_ERR(acl)); if (!acl) { - ip->i_mode &= ~current_umask(); + ITOZ(ip)->z_mode = (ip->i_mode &= ~current_umask()); ip->i_ctime = current_time(ip); zfs_mark_inode_dirty(ip); return (0); @@ -1167,7 +1167,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir) mode = ip->i_mode; error = __posix_acl_create(&acl, GFP_KERNEL, &mode); if (error >= 0) { - ip->i_mode = mode; + ip->i_mode = ITOZ(ip)->z_mode = mode; zfs_mark_inode_dirty(ip); if (error > 0) { error = zpl_set_acl_impl(ip, acl,