Skip to contentSkip to conversation

staging: fwserial: Switch to kvfree_rcu() API

PATCH Superseded Shang XiaoJing 1 participant 1 message Sep 17, 2022 Staging

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: fwserial: Switch to kvfree_rcu() API

Instead of invoking a synchronize_rcu() to free a pointer after a grace period, we can directly make use of new API that does the same but in more efficient way.

---
 drivers/staging/fwserial/fwserial.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/fwserial/fwserial.c +1 -2
index 81b06d88ed0d..ac2d625f0883 100644
@@ -2117,8 +2117,7 @@ static void fwserial_remove_peer(struct fwtty_peer *peer)
 	if (port)
 		fwserial_release_port(port, true);
 
-	synchronize_rcu();
-	kfree(peer);
+	kvfree_rcu(peer);
 }
 
 /**
Signature · 1 line
2.17.1