]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dm era: Use correct value size in equality function of writeset tree
authorNikos Tsironis <ntsironis@arrikto.com>
Fri, 22 Jan 2021 15:25:55 +0000 (17:25 +0200)
committerMike Snitzer <snitzer@redhat.com>
Wed, 10 Feb 2021 18:32:49 +0000 (13:32 -0500)
Fix the writeset tree equality test function to use the right value size
when comparing two btree values.

Fixes: b83b01ee643a86 ("dm: add era target")
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Reviewed-by: Ming-Hung Tsai <mtsai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-era-target.c

index 1abd280ff8dce0135ee7fc0a385f62877fb49b99..d0e75fd31c1eda618207d21cdb0e29bf6add9947 100644 (file)
@@ -389,7 +389,7 @@ static void ws_dec(void *context, const void *value)
 
 static int ws_eq(void *context, const void *value1, const void *value2)
 {
-       return !memcmp(value1, value2, sizeof(struct writeset_metadata));
+       return !memcmp(value1, value2, sizeof(struct writeset_disk));
 }
 
 /*----------------------------------------------------------------*/