mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
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>
This commit is contained in:
parent
910013f7c7
commit
6f80ed14d7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user