Skip to content

Commit aef2431

Browse files
elic307imstsirkin
authored andcommitted
vdpa/mlx5: Don't clear mr struct on destroy MR
Clearing the mr struct erases the lock owner and causes warnings to be emitted. It is not required to clear the mr so remove the memset call. Fixes: 94abbcc ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Eli Cohen <elic@nvidia.com> Message-Id: <20230206121956.1149356-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 446062e commit aef2431

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

  • drivers/vdpa/mlx5/core

drivers/vdpa/mlx5/core/mr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev)
503503
else
504504
destroy_dma_mr(mvdev, mr);
505505

506-
memset(mr, 0, sizeof(*mr));
507506
mr->initialized = false;
508507
out:
509508
mutex_unlock(&mr->mkey_mtx);

0 commit comments

Comments
 (0)