diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-10-07 19:23:19 +0200 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-11-14 17:50:46 +0100 |
commit | 6f80ed14d76c730f7943777ba259cd32870e6433 (patch) | |
tree | 88b8def9d7decf2e85ebd964aa04a4370506e2aa /fs/ntfs3 | |
parent | fs/ntfs3: Restore correct state after ENOSPC in attr_data_get_block (diff) | |
download | linux-6f80ed14d76c730f7943777ba259cd32870e6433.tar.xz linux-6f80ed14d76c730f7943777ba259cd32870e6433.zip |
fs/ntfs3: Correct ntfs_check_for_free_space
zlen in some cases was bigger than correct value.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r-- | fs/ntfs3/fsntfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index 4f04e8594a8f..6a1e000fd2b5 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -456,7 +456,7 @@ bool ntfs_check_for_free_space(struct ntfs_sb_info *sbi, CLST clen, CLST mlen) wnd = &sbi->used.bitmap; down_read_nested(&wnd->rw_lock, BITMAP_MUTEX_CLUSTERS); free = wnd_zeroes(wnd); - zlen = wnd_zone_len(wnd); + zlen = min_t(size_t, NTFS_MIN_MFT_ZONE, wnd_zone_len(wnd)); up_read(&wnd->rw_lock); if (free < zlen + clen) |