mdadm/0148-mdadm-super1-fix-coverity-issue-DEADCODE.patch
Xiao Ni aba27b5983 Update to latest upstream
Fix coverity issue 34533 and  /dev/md symlink not created for second RAID container
issue 50776

Resolves: RHEL-34533, RHEL50776

Signed-off-by: Xiao Ni <xni@redhat.com>
2024-08-10 23:06:32 -04:00

30 lines
838 B
Diff

From 7904dc1c576a742c601c40dab4d0a6e562c4d00c Mon Sep 17 00:00:00 2001
From: Xiao Ni <xni@redhat.com>
Date: Fri, 26 Jul 2024 15:14:14 +0800
Subject: [PATCH 148/157] mdadm/super1: fix coverity issue DEADCODE
optimal_space is at most 2046. So space can't be larger than UINT16_MAX.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
super1.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/super1.c b/super1.c
index 4e4c7bfd..24bc1026 100644
--- a/super1.c
+++ b/super1.c
@@ -1466,8 +1466,6 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
__le32_to_cpu(sb->chunksize));
if (space > optimal_space)
space = optimal_space;
- if (space > UINT16_MAX)
- space = UINT16_MAX;
}
sb->ppl.offset = __cpu_to_le16(offset);
--
2.41.0