[PATCH] fs/ntfs3: remove duplicate check on "asize"

Dan Carpenter posted 1 patch 2 months, 3 weeks ago
fs/ntfs3/record.c | 4 ----
1 file changed, 4 deletions(-)
[PATCH] fs/ntfs3: remove duplicate check on "asize"
Posted by Dan Carpenter 2 months, 3 weeks ago
Commit 556bdf27c2dd ("ntfs3: Add bounds checking to mi_enum_attr()")
added a new check directly after "asize" is assigned so this check
is duplicative.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 fs/ntfs3/record.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index 427c71be0f08..0f400366231d 100644
--- a/fs/ntfs3/record.c
+++ b/fs/ntfs3/record.c
@@ -268,10 +268,6 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
 
 	/* Check size of attribute. */
 	if (!attr->non_res) {
-		/* Check resident fields. */
-		if (asize < SIZEOF_RESIDENT)
-			return NULL;
-
 		t16 = le16_to_cpu(attr->res.data_off);
 		if (t16 > asize)
 			return NULL;
-- 
2.45.2