[Devel] [PATCH RH8 7/8] ploop: Kill dead check

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jul 1 18:14:52 MSK 2021


Now we iter till size_in_clus - 1, so this check is impossible.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-bat.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index 036edc317de3..17c2fe46ed57 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -491,11 +491,9 @@ static void apply_delta_mappings(struct ploop *ploop, struct ploop_delta *deltas
 
 			if (!is_raw)
 				dst_clu = delta_bat_entries[i];
-			else {
+			else
 				dst_clu = clu;
-				if (dst_clu >= size_in_clus)
-					dst_clu = BAT_ENTRY_NONE;
-			}
+
 			if (dst_clu == BAT_ENTRY_NONE)
 				continue;
 			md->bat_levels[i] = level;




More information about the Devel mailing list