diff options
author | 2021-09-07 17:28:40 +0300 | |
---|---|---|
committer | 2021-09-16 17:01:37 +0300 | |
commit | f162f7b8dbc29742896f8a7e678bb31192716ae0 (patch) | |
tree | 545d74dcdaadd6e309607162f7b20b3123d9b81c /fs/ntfs3 | |
parent | fs/ntfs3: Fix ntfs_look_for_free_space() does only report -ENOSPC (diff) | |
download | linux-f162f7b8dbc29742896f8a7e678bb31192716ae0.tar.gz linux-f162f7b8dbc29742896f8a7e678bb31192716ae0.tar.bz2 linux-f162f7b8dbc29742896f8a7e678bb31192716ae0.zip |
fs/ntfs3: Remove always false condition check
We do not need this check as this is same thing as
NTFS_MIN_MFT_ZONE > zlen. We already check NTFS_MIN_MFT_ZONE <= zlen and
exit because is too big request. Remove it so code is cleaner.
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r-- | fs/ntfs3/fsntfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c index e77fad89eaed..4cd24e4e58ff 100644 --- a/fs/ntfs3/fsntfs.c +++ b/fs/ntfs3/fsntfs.c @@ -422,11 +422,8 @@ int ntfs_look_for_free_space(struct ntfs_sb_info *sbi, CLST lcn, CLST len, ztrim = len > zlen ? zlen : (len > zlen2 ? len : zlen2); new_zlen = zlen - ztrim; - if (new_zlen < NTFS_MIN_MFT_ZONE) { + if (new_zlen < NTFS_MIN_MFT_ZONE) new_zlen = NTFS_MIN_MFT_ZONE; - if (new_zlen > zlen) - new_zlen = zlen; - } wnd_zone_set(wnd, zlcn, new_zlen); |