* [PATCH v3 -next] staging: fwserial: Switch to kvfree_rcu() API
@ 2022-09-17 2:41 Shang XiaoJing
0 siblings, 0 replies; only message in thread
From: Shang XiaoJing @ 2022-09-17 2:41 UTC (permalink / raw)
To: gregkh, andy.shevchenko, ilpo.jarvinen, linux-staging; +Cc: shangxiaojing
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.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
---
drivers/staging/fwserial/fwserial.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 81b06d88ed0d..ac2d625f0883 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -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);
}
/**
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-17 2:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 2:41 [PATCH v3 -next] staging: fwserial: Switch to kvfree_rcu() API Shang XiaoJing
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.