]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/ntfs3: Update inode->i_mapping->a_ops on compression state
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Thu, 30 Jan 2025 14:03:41 +0000 (17:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:22 +0000 (14:39 +0200)
commit641394fbb5a5355f1ae3dc833c71960ea1797e03
tree7a89a911a3ce8c6b678c3196b438559a82536062
parent4f750b84628080ff0d67bf1af67a4967b740acf2
fs/ntfs3: Update inode->i_mapping->a_ops on compression state

[ Upstream commit b432163ebd15a0fb74051949cb61456d6c55ccbd ]

Update inode->i_mapping->a_ops when the compression state changes to
ensure correct address space operations.
Clear ATTR_FLAG_SPARSED/FILE_ATTRIBUTE_SPARSE_FILE when enabling
compression to prevent flag conflicts.

v2:
Additionally, ensure that all dirty pages are flushed and concurrent access
to the page cache is blocked.

Fixes: 6b39bfaeec44 ("fs/ntfs3: Add support for the compression attribute")
Reported-by: Kun Hu <huk23@m.fudan.edu.cn>, Jiaji Qin <jjtan24@m.fudan.edu.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/attrib.c
fs/ntfs3/file.c
fs/ntfs3/frecord.c