LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kari Argillander <kari.argillander@gmail.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
ntfs3@lists.linux.dev
Cc: Kari Argillander <kari.argillander@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] fs/ntfs3: Remove always false condition check
Date: Tue, 7 Sep 2021 17:28:40 +0300 [thread overview]
Message-ID: <20210907142842.133181-3-kari.argillander@gmail.com> (raw)
In-Reply-To: <20210907142842.133181-1-kari.argillander@gmail.com>
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>
---
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
next prev parent reply other threads:[~2021-09-07 14:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 14:28 [PATCH 0/4] Fix error path and use kernel macros for min/max/calmp Kari Argillander
2021-09-07 14:28 ` [PATCH 1/4] fs/ntfs3: Fix ntfs_look_for_free_space() does only report -ENOSPC Kari Argillander
2021-09-07 14:28 ` Kari Argillander [this message]
2021-09-07 14:28 ` [PATCH 3/4] fs/ntfs3: Use clamp/max macros instead of comparisons Kari Argillander
2021-09-07 14:28 ` [PATCH 4/4] fs/ntfs3: Use min/max macros instated of ternary operators Kari Argillander
2021-09-16 14:11 ` [PATCH 0/4] Fix error path and use kernel macros for min/max/calmp Konstantin Komarov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210907142842.133181-3-kari.argillander@gmail.com \
--to=kari.argillander@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--subject='Re: [PATCH 2/4] fs/ntfs3: Remove always false condition check' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).