drm/gpusvm: set has_dma_mapping inside mapping loop
authorDafna Hirschfeld <dafna.hirschfeld@intel.com>
Mon, 28 Apr 2025 02:47:52 +0000 (19:47 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Tue, 29 Apr 2025 18:18:13 +0000 (11:18 -0700)
commitf64cf7b681af72d3f715c0d0fd72091a54471c1a
treea80ee4d13a108645383b4e777036338f9370d6ae
parent70a2585e582058e94fe4381a337be42dec800337
drm/gpusvm: set has_dma_mapping inside mapping loop

The 'has_dma_mapping' flag should be set once there is a
mapping so it could be unmapped in case of error.

v2:
- Resend for CI

Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250428024752.881292-1-matthew.brost@intel.com
drivers/gpu/drm/drm_gpusvm.c