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 <shangxiaojing@huawei.com> Link: https://lore.kernel.org/r/20220920135145.1387-1-shangxiaojing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9634b371b6
commit
74adc1f005
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue