From b3dd259d838016b605418cbaace3af777499824a Mon Sep 17 00:00:00 2001 From: Baolin Liu Date: Wed, 23 Sep 2026 14:02:37 +0800 Subject: [PATCH] ntfs: keep the EA presence flag after creating the first entry The successful EA update path tests ea_info_qsize when updating NInoHasEA, but this size excludes the appended entry. Creating the first EA, or replacing the only entry, can therefore clear the cached presence flag despite a successful update. Reads then return ENODATA until reload. Include the appended entry in the size used for the presence test. Signed-off-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon --- fs/ntfs/ea.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ntfs/ea.c b/fs/ntfs/ea.c index 732bc5825191..62c827a80e6f 100644 --- a/fs/ntfs/ea.c +++ b/fs/ntfs/ea.c @@ -403,6 +403,7 @@ static int ntfs_set_ea(struct inode *inode, const char *name, size_t name_len, if (packed_ea_size) *packed_ea_size = p_ea_info->ea_length; + ea_info_qsize += new_ea_size; mark_mft_record_dirty(ni); out: if (!err) {