Re: [PATCH] fs/ntfs3: remove redundant if-block in check_attr()

From: Konstantin Komarov

Date: Wed Oct 07 2026 - 17:33:10 EST


On 7/19/26 22:25, Matvey Kovalev wrote:

Condition of this if-block repeats another one from if-block above. So,
condition is always false.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Matvey Kovalev <matvey.kovalev@xxxxxxxxx>
---
fs/ntfs3/fslog.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index f038c799e7ac..7c40eff69959 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -2753,9 +2753,6 @@ static inline bool check_attr(const struct MFT_REC *rec,
return false;
}

- if (run_off > asize)
- return false;
-
if (run_unpack(NULL, sbi, 0, svcn, evcn, svcn,
Add2Ptr(attr, run_off), asize - run_off) < 0) {
return false;
--
2.54.0

Hello,

The patch was applied, thanks.

Regards,
Konstantin