mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
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 <liubaolin@kylinos.cn> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
f8f026e3ab
commit
b3dd259d83
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user