staging: fwserial: Switch to kfree_rcu() API
PATCH v6 1/1 staging: fwserial: Switch to kfree_rcu() API
Instead of invoking a synchronize_rcu() to free a pointer after a grace period, we can directly make use of a new API that does the same but in a more efficient way.
Signed-off-by Shang XiaoJing <[email protected]>
---
Changelog:
v3: the first version of the PATCH
v1: v3 resent as v1
v2: use kfree_rcu() instead of kvfree_rcu() for clarity
v4: resend v2 as v4 to avoid versioning confusion
v5: add the rcu_head of fwtty_peer as the input param for wider usage
v6: revert to v4
--- drivers/staging/fwserial/fwserial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/fwserial/fwserial.c +1 -2
@@ -2117,8 +2117,7 @@ static void fwserial_remove_peer(struct fwtty_peer *peer)if (port)fwserial_release_port (port, true); -synchronize_rcu (); -kfree (peer); +kfree_rcu (peer); }/**
Signature · 1 line
2.17.1