fs/ntfs3: Remove always false condition check
authorKari Argillander <kari.argillander@gmail.com>
Tue, 7 Sep 2021 14:28:40 +0000 (17:28 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Thu, 16 Sep 2021 14:01:37 +0000 (17:01 +0300)
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>
fs/ntfs3/fsntfs.c

index e77fad8..4cd24e4 100644 (file)
@@ -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);