Skip to content

Commit

Permalink
dm era: Use correct value size in equality function of writeset tree
Browse files Browse the repository at this point in the history
commit 64f2d15 upstream.

Fix the writeset tree equality test function to use the right value size
when comparing two btree values.

Fixes: eec4057 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
ntsiron authored and gregkh committed Mar 4, 2021
1 parent 89f7565 commit e355781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-era-target.c
Expand Up @@ -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));
}

/*----------------------------------------------------------------*/
Expand Down

0 comments on commit e355781

Please sign in to comment.