[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210907142842.133181-3-kari.argillander@gmail.com>
Date: Tue, 7 Sep 2021 17:28:40 +0300
From: Kari Argillander <kari.argillander@...il.com>
To: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
ntfs3@...ts.linux.dev
Cc: Kari Argillander <kari.argillander@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/4] 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@...il.com>
---
fs/ntfs3/fsntfs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
index ae7c6435d7bc..99d0a2799b0e 100644
--- a/fs/ntfs3/fsntfs.c
+++ b/fs/ntfs3/fsntfs.c
@@ -423,11 +423,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);
--
2.25.1
Powered by blists - more mailing lists