diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 845b8620afcf6..34da8d341c0c4 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5179,7 +5179,7 @@ static int ext4_do_update_inode(handle_t *handle, raw_inode->i_file_acl_high = cpu_to_le16(ei->i_file_acl >> 32); raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl); - if (ei->i_disksize != ext4_isize(inode->i_sb, raw_inode)) { + if (READ_ONCE(ei->i_disksize) != ext4_isize(inode->i_sb, raw_inode)) { ext4_isize_set(raw_inode, ei->i_disksize); need_datasync = 1; }