diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 986475c0d55267540006c6243478231318ad7e48..289a40a81299ec3e45dc566620ca8bd3d152a539 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1159,6 +1159,9 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len, if (inode->i_ino == EXT4_ROOT_INO) return -EPERM; + if (WARN_ON_ONCE(IS_DAX(inode) && i_size_read(inode))) + return -EINVAL; + res = ext4_convert_inline_data(inode); if (res) return res;