]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
fs/ntfs3: Keep preallocated only if option prealloc enabled
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 22 Oct 2021 14:37:52 +0000 (17:37 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:23:32 +0000 (09:23 +0200)
commit02b3b573e92ed27237969daecd4fa6566366cb6c
tree6a1245b8415f492c5849164bc57e7af64fbb836d
parent08e1042867f5d5115e423f7bcc636bdaa1b545e4
fs/ntfs3: Keep preallocated only if option prealloc enabled

BugLink: https://bugs.launchpad.net/bugs/1981864
commit e95113ed4d428219e3395044e29f5713fc446720 upstream.

If size of file was reduced, we still kept allocated blocks.
This commit makes ntfs3 work as other fs like btrfs.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=214719
Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Reported-by: Ganapathi Kamath <hgkamath@hotmail.com>
Tested-by: Ganapathi Kamath <hgkamath@hotmail.com>
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/ntfs3/file.c