* [PATCH] net: intel: ice: Modernize ice_vsi_free() with scope-based guard(mutex)
@ 2026-10-14 11:05 Ayush Yaduvanshi
0 siblings, 0 replies; only message in thread
From: Ayush Yaduvanshi @ 2026-10-14 11:05 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: przemyslaw.kitszel, intel-wired-lan, netdev, linux-kernel,
Ayush Yaduvanshi
Signed-off-by: Ayush Yaduvanshi <ayush37735@gmail.com>
---
drivers/net/ethernet/intel/ice/ice_lib.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 9e08db376d3d..c695df442822 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -457,7 +457,7 @@ void ice_vsi_free(struct ice_vsi *vsi)
return;
}
- mutex_lock(&pf->sw_mutex);
+ guard(mutex)(&pf->sw_mutex);
/* updates the PF for this cleared VSI */
pf->vsi[vsi->idx] = NULL;
@@ -466,7 +466,6 @@ void ice_vsi_free(struct ice_vsi *vsi)
ice_vsi_free_stats(vsi);
ice_vsi_free_arrays(vsi);
mutex_destroy(&vsi->xdp_state_lock);
- mutex_unlock(&pf->sw_mutex);
devm_kfree(dev, vsi);
}
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-14 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 11:05 [PATCH] net: intel: ice: Modernize ice_vsi_free() with scope-based guard(mutex) Ayush Yaduvanshi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox