Commit 74adc1f0 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Greg Kroah-Hartman

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: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20220920135145.1387-1-shangxiaojing@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9634b371
......@@ -2116,8 +2116,7 @@ static void fwserial_remove_peer(struct fwtty_peer *peer)
if (port)
fwserial_release_port(port, true);
synchronize_rcu();
kfree(peer);
kfree_rcu(peer);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment